You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
Hi,
When generating rust client with default configuration, the generated code contains compilation errors related to models module importation inside Option types (models::models:: instead of models::):
error[E0433]: failed to resolve: could not find `models`in`models`
--> src/apis/accounts_api.rs:101:157
|
101 | ...configuration::Configuration, account: &str, r#type: Option<models::models::AchievementType>, completed: Option<bool>, page: Option<i32>, size: Option<i32>) -> Result<models::Data...
| ^^^^^^ could not find `models`in`models`|
help: consider importing this module
|
12 + use crate::models;|
help: if you import `models`, refer to it directly
|
101 - pub async fn get_account_achievements_accounts_account_achievements_get(configuration: &configuration::Configuration, account: &str, r#type: Option<models::models::AchievementType>, completed: Option<bool>, page: Option<i32>, size: Option<i32>) -> Result<models::DataPageAccountAchievementSchema, Error<GetAccountAchievementsAccountsAccountAchievementsGetError>> {
101 + pub async fn get_account_achievements_accounts_account_achievements_get(configuration: &configuration::Configuration, account: &str, r#type: Option<models::AchievementType>, completed: Option<bool>, page: Option<i32>, size: Option<i32>) -> Result<models::DataPageAccountAchievementSchema, Error<GetAccountAchievementsAccountsAccountAchievementsGetError>> {
|
When generating using master (18b01ca), I also get following kind of error:
Bug Report Checklist
Description
Hi,
When generating
rust
client with default configuration, the generated code contains compilation errors related tomodels
module importation insideOption
types (models::models::
instead ofmodels::
):When generating using
master
(18b01ca), I also get following kind of error:openapi-generator version
7.10.0
OpenAPI declaration file content or url
https://api.artifactsmmo.com/openapi.json
Generation Details
docker run --rm -v "$PWD:/local" openapitools/openapi-generator-cli generate \ -i https://api.artifactsmmo.com/openapi.json \ -g rust \ -o /local/out/rust
Steps to reproduce
Build the generated crate using
cargo build
.The text was updated successfully, but these errors were encountered: