diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java index 6bd358bd234..ad2c260cac1 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java @@ -124,9 +124,9 @@ public class RustClientCodegen extends DefaultCodegen implements CodegenConfig { // I tried to map as "std::io::File", but Reqwest multipart file requires a "AsRef" param. // Getting a file from a Path is simple, but the opposite is difficult. So I map as "std::path::Path". typeMapping.put("file", "std::path::PathBuf"); - typeMapping.put("binary", "::models::File"); + typeMapping.put("binary", "crate::models::File"); typeMapping.put("ByteArray", "String"); - typeMapping.put("object", "Value"); + typeMapping.put("object", "serde_json::Value"); // no need for rust //importMapping = new HashMap(); @@ -352,8 +352,8 @@ public class RustClientCodegen extends DefaultCodegen implements CodegenConfig { } // return fully-qualified model name - // ::models::{{classnameFile}}::{{classname}} - return "::models::" + toModelName(schemaType); + // crate::models::{{classnameFile}}::{{classname}} + return "crate::models::" + toModelName(schemaType); } @Override diff --git a/modules/openapi-generator/src/main/resources/rust/hyper/api.mustache b/modules/openapi-generator/src/main/resources/rust/hyper/api.mustache index 426fee7fe80..872148bdddd 100644 --- a/modules/openapi-generator/src/main/resources/rust/hyper/api.mustache +++ b/modules/openapi-generator/src/main/resources/rust/hyper/api.mustache @@ -24,7 +24,7 @@ impl {{{classname}}}Client { pub trait {{{classname}}} { {{#operations}} {{#operation}} - fn {{{operationId}}}(&self, {{#allParams}}{{{paramName}}}: {{#isString}}&str{{/isString}}{{#isUuid}}&str{{/isUuid}}{{^isString}}{{^isUuid}}{{^isPrimitiveType}}{{^isContainer}}::models::{{/isContainer}}{{/isPrimitiveType}}{{{dataType}}}{{/isUuid}}{{/isString}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) -> Box>>; + fn {{{operationId}}}(&self, {{#allParams}}{{{paramName}}}: {{#isString}}&str{{/isString}}{{#isUuid}}&str{{/isUuid}}{{^isString}}{{^isUuid}}{{^isPrimitiveType}}{{^isContainer}}crate::models::{{/isContainer}}{{/isPrimitiveType}}{{{dataType}}}{{/isUuid}}{{/isString}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) -> Box>>; {{/operation}} {{/operations}} } @@ -33,7 +33,7 @@ pub trait {{{classname}}} { impl{{{classname}}} for {{{classname}}}Client { {{#operations}} {{#operation}} - fn {{{operationId}}}(&self, {{#allParams}}{{{paramName}}}: {{#isString}}&str{{/isString}}{{#isUuid}}&str{{/isUuid}}{{^isString}}{{^isUuid}}{{^isPrimitiveType}}{{^isContainer}}::models::{{/isContainer}}{{/isPrimitiveType}}{{{dataType}}}{{/isUuid}}{{/isString}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) -> Box>> { + fn {{{operationId}}}(&self, {{#allParams}}{{{paramName}}}: {{#isString}}&str{{/isString}}{{#isUuid}}&str{{/isUuid}}{{^isString}}{{^isUuid}}{{^isPrimitiveType}}{{^isContainer}}crate::models::{{/isContainer}}{{/isPrimitiveType}}{{{dataType}}}{{/isUuid}}{{/isString}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) -> Box>> { __internal_request::Request::new(hyper::Method::{{{httpMethod}}}, "{{{path}}}".to_string()) {{#hasAuthMethods}} {{#authMethods}} diff --git a/modules/openapi-generator/src/main/resources/rust/hyper/client.mustache b/modules/openapi-generator/src/main/resources/rust/hyper/client.mustache index f93577e7cb1..a0648b758bc 100644 --- a/modules/openapi-generator/src/main/resources/rust/hyper/client.mustache +++ b/modules/openapi-generator/src/main/resources/rust/hyper/client.mustache @@ -10,7 +10,7 @@ pub struct APIClient { {{#operations}} {{#operation}} {{#-last}} - {{{classFilename}}}: Box<::apis::{{{classname}}}>, + {{{classFilename}}}: Box, {{/-last}} {{/operation}} {{/operations}} @@ -29,7 +29,7 @@ impl APIClient { {{#operations}} {{#operation}} {{#-last}} - {{{classFilename}}}: Box::new(::apis::{{{classname}}}Client::new(rc.clone())), + {{{classFilename}}}: Box::new(crate::apis::{{{classname}}}Client::new(rc.clone())), {{/-last}} {{/operation}} {{/operations}} @@ -43,7 +43,7 @@ impl APIClient { {{#operations}} {{#operation}} {{#-last}} - pub fn {{{classFilename}}}(&self) -> &::apis::{{{classname}}}{ + pub fn {{{classFilename}}}(&self) -> &crate::apis::{{{classname}}}{ self.{{{classFilename}}}.as_ref() } diff --git a/modules/openapi-generator/src/main/resources/rust/model.mustache b/modules/openapi-generator/src/main/resources/rust/model.mustache index 4c6b8dff10c..37a3ff77bcc 100644 --- a/modules/openapi-generator/src/main/resources/rust/model.mustache +++ b/modules/openapi-generator/src/main/resources/rust/model.mustache @@ -5,9 +5,6 @@ /// {{{classname}}} : {{{description}}} {{/description}} -#[allow(unused_imports)] -use serde_json::Value; - {{!-- for enum schemas --}} {{#isEnum}} /// {{{description}}} diff --git a/modules/openapi-generator/src/main/resources/rust/reqwest/api.mustache b/modules/openapi-generator/src/main/resources/rust/reqwest/api.mustache index e6706f7afe1..038284ec6c3 100644 --- a/modules/openapi-generator/src/main/resources/rust/reqwest/api.mustache +++ b/modules/openapi-generator/src/main/resources/rust/reqwest/api.mustache @@ -21,7 +21,7 @@ impl {{{classname}}}Client { pub trait {{{classname}}} { {{#operations}} {{#operation}} - fn {{{operationId}}}(&self, {{#allParams}}{{{paramName}}}: {{#isString}}&str{{/isString}}{{#isUuid}}&str{{/isUuid}}{{^isString}}{{^isUuid}}{{^isPrimitiveType}}{{^isContainer}}::models::{{/isContainer}}{{/isPrimitiveType}}{{{dataType}}}{{/isUuid}}{{/isString}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) -> Result<{{^returnType}}(){{/returnType}}{{#returnType}}{{{returnType}}}{{/returnType}}, Error>; + fn {{{operationId}}}(&self, {{#allParams}}{{{paramName}}}: {{#isString}}&str{{/isString}}{{#isUuid}}&str{{/isUuid}}{{^isString}}{{^isUuid}}{{^isPrimitiveType}}{{^isContainer}}crate::models::{{/isContainer}}{{/isPrimitiveType}}{{{dataType}}}{{/isUuid}}{{/isString}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) -> Result<{{^returnType}}(){{/returnType}}{{#returnType}}{{{returnType}}}{{/returnType}}, Error>; {{/operation}} {{/operations}} } @@ -29,7 +29,7 @@ pub trait {{{classname}}} { impl {{{classname}}} for {{{classname}}}Client { {{#operations}} {{#operation}} - fn {{{operationId}}}(&self, {{#allParams}}{{{paramName}}}: {{#isString}}&str{{/isString}}{{#isUuid}}&str{{/isUuid}}{{^isString}}{{^isUuid}}{{^isPrimitiveType}}{{^isContainer}}::models::{{/isContainer}}{{/isPrimitiveType}}{{{dataType}}}{{/isUuid}}{{/isString}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) -> Result<{{^returnType}}(){{/returnType}}{{#returnType}}{{{returnType}}}{{/returnType}}, Error> { + fn {{{operationId}}}(&self, {{#allParams}}{{{paramName}}}: {{#isString}}&str{{/isString}}{{#isUuid}}&str{{/isUuid}}{{^isString}}{{^isUuid}}{{^isPrimitiveType}}{{^isContainer}}crate::models::{{/isContainer}}{{/isPrimitiveType}}{{{dataType}}}{{/isUuid}}{{/isString}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) -> Result<{{^returnType}}(){{/returnType}}{{#returnType}}{{{returnType}}}{{/returnType}}, Error> { let configuration: &configuration::Configuration = self.configuration.borrow(); let client = &configuration.client; diff --git a/modules/openapi-generator/src/main/resources/rust/reqwest/client.mustache b/modules/openapi-generator/src/main/resources/rust/reqwest/client.mustache index 33f2b2fd61b..5fdede09c4f 100644 --- a/modules/openapi-generator/src/main/resources/rust/reqwest/client.mustache +++ b/modules/openapi-generator/src/main/resources/rust/reqwest/client.mustache @@ -9,7 +9,7 @@ pub struct APIClient { {{#operations}} {{#operation}} {{#-last}} - {{{classFilename}}}: Box<::apis::{{{classname}}}>, + {{{classFilename}}}: Box, {{/-last}} {{/operation}} {{/operations}} @@ -28,7 +28,7 @@ impl APIClient { {{#operations}} {{#operation}} {{#-last}} - {{{classFilename}}}: Box::new(::apis::{{{classname}}}Client::new(rc.clone())), + {{{classFilename}}}: Box::new(crate::apis::{{{classname}}}Client::new(rc.clone())), {{/-last}} {{/operation}} {{/operations}} @@ -42,7 +42,7 @@ impl APIClient { {{#operations}} {{#operation}} {{#-last}} - pub fn {{{classFilename}}}(&self) -> &::apis::{{{classname}}}{ + pub fn {{{classFilename}}}(&self) -> &crate::apis::{{{classname}}}{ self.{{{classFilename}}}.as_ref() } diff --git a/samples/client/petstore/rust-reqwest/.openapi-generator/VERSION b/samples/client/petstore/rust-reqwest/.openapi-generator/VERSION index d96260ba335..83a328a9227 100644 --- a/samples/client/petstore/rust-reqwest/.openapi-generator/VERSION +++ b/samples/client/petstore/rust-reqwest/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/rust-reqwest/docs/Pet.md b/samples/client/petstore/rust-reqwest/docs/Pet.md index 53a462e68b9..2c8ea36dd91 100644 --- a/samples/client/petstore/rust-reqwest/docs/Pet.md +++ b/samples/client/petstore/rust-reqwest/docs/Pet.md @@ -5,10 +5,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **i64** | | [optional] -**category** | [***::models::Category**](Category.md) | | [optional] +**category** | [***crate::models::Category**](Category.md) | | [optional] **name** | **String** | | **photo_urls** | **Vec** | | -**tags** | [**Vec<::models::Tag>**](Tag.md) | | [optional] +**tags** | [**Vec**](Tag.md) | | [optional] **status** | **String** | pet status in the store | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/rust-reqwest/docs/PetApi.md b/samples/client/petstore/rust-reqwest/docs/PetApi.md index a74635038e7..336116bee51 100644 --- a/samples/client/petstore/rust-reqwest/docs/PetApi.md +++ b/samples/client/petstore/rust-reqwest/docs/PetApi.md @@ -85,7 +85,7 @@ Name | Type | Description | Notes ## find_pets_by_status -> Vec<::models::Pet> find_pets_by_status(ctx, status) +> Vec find_pets_by_status(ctx, status) Finds Pets by status Multiple status values can be provided with comma separated strings @@ -100,7 +100,7 @@ Name | Type | Description | Notes ### Return type -[**Vec<::models::Pet>**](Pet.md) +[**Vec**](Pet.md) ### Authorization @@ -116,7 +116,7 @@ Name | Type | Description | Notes ## find_pets_by_tags -> Vec<::models::Pet> find_pets_by_tags(ctx, tags) +> Vec find_pets_by_tags(ctx, tags) Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. @@ -131,7 +131,7 @@ Name | Type | Description | Notes ### Return type -[**Vec<::models::Pet>**](Pet.md) +[**Vec**](Pet.md) ### Authorization @@ -147,7 +147,7 @@ Name | Type | Description | Notes ## get_pet_by_id -> ::models::Pet get_pet_by_id(ctx, pet_id) +> crate::models::Pet get_pet_by_id(ctx, pet_id) Find pet by ID Returns a single pet @@ -162,7 +162,7 @@ Name | Type | Description | Notes ### Return type -[**::models::Pet**](Pet.md) +[**crate::models::Pet**](Pet.md) ### Authorization @@ -247,7 +247,7 @@ Name | Type | Description | Notes ## upload_file -> ::models::ApiResponse upload_file(ctx, pet_id, optional) +> crate::models::ApiResponse upload_file(ctx, pet_id, optional) uploads an image ### Required Parameters @@ -271,7 +271,7 @@ Name | Type | Description | Notes ### Return type -[**::models::ApiResponse**](ApiResponse.md) +[**crate::models::ApiResponse**](ApiResponse.md) ### Authorization diff --git a/samples/client/petstore/rust-reqwest/docs/StoreApi.md b/samples/client/petstore/rust-reqwest/docs/StoreApi.md index e57378b9f84..28ae8c60af6 100644 --- a/samples/client/petstore/rust-reqwest/docs/StoreApi.md +++ b/samples/client/petstore/rust-reqwest/docs/StoreApi.md @@ -70,7 +70,7 @@ This endpoint does not need any parameter. ## get_order_by_id -> ::models::Order get_order_by_id(order_id) +> crate::models::Order get_order_by_id(order_id) Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions @@ -84,7 +84,7 @@ Name | Type | Description | Notes ### Return type -[**::models::Order**](Order.md) +[**crate::models::Order**](Order.md) ### Authorization @@ -100,7 +100,7 @@ No authorization required ## place_order -> ::models::Order place_order(body) +> crate::models::Order place_order(body) Place an order for a pet ### Required Parameters @@ -112,7 +112,7 @@ Name | Type | Description | Notes ### Return type -[**::models::Order**](Order.md) +[**crate::models::Order**](Order.md) ### Authorization diff --git a/samples/client/petstore/rust-reqwest/docs/UserApi.md b/samples/client/petstore/rust-reqwest/docs/UserApi.md index d469a52df88..ce5490e8062 100644 --- a/samples/client/petstore/rust-reqwest/docs/UserApi.md +++ b/samples/client/petstore/rust-reqwest/docs/UserApi.md @@ -55,7 +55,7 @@ Creates list of users with given input array Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**Vec<::models::User>**](User.md)| List of user object | + **body** | [**Vec**](User.md)| List of user object | ### Return type @@ -83,7 +83,7 @@ Creates list of users with given input array Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**Vec<::models::User>**](User.md)| List of user object | + **body** | [**Vec**](User.md)| List of user object | ### Return type @@ -133,7 +133,7 @@ No authorization required ## get_user_by_name -> ::models::User get_user_by_name(username) +> crate::models::User get_user_by_name(username) Get user by user name ### Required Parameters @@ -145,7 +145,7 @@ Name | Type | Description | Notes ### Return type -[**::models::User**](User.md) +[**crate::models::User**](User.md) ### Authorization diff --git a/samples/client/petstore/rust-reqwest/src/apis/client.rs b/samples/client/petstore/rust-reqwest/src/apis/client.rs index ea6b0eb635b..14088cbe309 100644 --- a/samples/client/petstore/rust-reqwest/src/apis/client.rs +++ b/samples/client/petstore/rust-reqwest/src/apis/client.rs @@ -4,9 +4,9 @@ use super::configuration::Configuration; pub struct APIClient { configuration: Rc, - pet_api: Box<::apis::PetApi>, - store_api: Box<::apis::StoreApi>, - user_api: Box<::apis::UserApi>, + pet_api: Box, + store_api: Box, + user_api: Box, } impl APIClient { @@ -15,21 +15,21 @@ impl APIClient { APIClient { configuration: rc.clone(), - pet_api: Box::new(::apis::PetApiClient::new(rc.clone())), - store_api: Box::new(::apis::StoreApiClient::new(rc.clone())), - user_api: Box::new(::apis::UserApiClient::new(rc.clone())), + pet_api: Box::new(crate::apis::PetApiClient::new(rc.clone())), + store_api: Box::new(crate::apis::StoreApiClient::new(rc.clone())), + user_api: Box::new(crate::apis::UserApiClient::new(rc.clone())), } } - pub fn pet_api(&self) -> &::apis::PetApi{ + pub fn pet_api(&self) -> &crate::apis::PetApi{ self.pet_api.as_ref() } - pub fn store_api(&self) -> &::apis::StoreApi{ + pub fn store_api(&self) -> &crate::apis::StoreApi{ self.store_api.as_ref() } - pub fn user_api(&self) -> &::apis::UserApi{ + pub fn user_api(&self) -> &crate::apis::UserApi{ self.user_api.as_ref() } diff --git a/samples/client/petstore/rust-reqwest/src/apis/pet_api.rs b/samples/client/petstore/rust-reqwest/src/apis/pet_api.rs index 53d2b82ea72..264fc30e685 100644 --- a/samples/client/petstore/rust-reqwest/src/apis/pet_api.rs +++ b/samples/client/petstore/rust-reqwest/src/apis/pet_api.rs @@ -28,18 +28,18 @@ impl PetApiClient { } pub trait PetApi { - fn add_pet(&self, body: ::models::Pet) -> Result<(), Error>; + fn add_pet(&self, body: crate::models::Pet) -> Result<(), Error>; fn delete_pet(&self, pet_id: i64, api_key: &str) -> Result<(), Error>; - fn find_pets_by_status(&self, status: Vec) -> Result, Error>; - fn find_pets_by_tags(&self, tags: Vec) -> Result, Error>; - fn get_pet_by_id(&self, pet_id: i64) -> Result<::models::Pet, Error>; - fn update_pet(&self, body: ::models::Pet) -> Result<(), Error>; + fn find_pets_by_status(&self, status: Vec) -> Result, Error>; + fn find_pets_by_tags(&self, tags: Vec) -> Result, Error>; + fn get_pet_by_id(&self, pet_id: i64) -> Result; + fn update_pet(&self, body: crate::models::Pet) -> Result<(), Error>; fn update_pet_with_form(&self, pet_id: i64, name: &str, status: &str) -> Result<(), Error>; - fn upload_file(&self, pet_id: i64, additional_metadata: &str, file: std::path::PathBuf) -> Result<::models::ApiResponse, Error>; + fn upload_file(&self, pet_id: i64, additional_metadata: &str, file: std::path::PathBuf) -> Result; } impl PetApi for PetApiClient { - fn add_pet(&self, body: ::models::Pet) -> Result<(), Error> { + fn add_pet(&self, body: crate::models::Pet) -> Result<(), Error> { let configuration: &configuration::Configuration = self.configuration.borrow(); let client = &configuration.client; @@ -83,7 +83,7 @@ impl PetApi for PetApiClient { Ok(()) } - fn find_pets_by_status(&self, status: Vec) -> Result, Error> { + fn find_pets_by_status(&self, status: Vec) -> Result, Error> { let configuration: &configuration::Configuration = self.configuration.borrow(); let client = &configuration.client; @@ -104,7 +104,7 @@ impl PetApi for PetApiClient { Ok(client.execute(req)?.error_for_status()?.json()?) } - fn find_pets_by_tags(&self, tags: Vec) -> Result, Error> { + fn find_pets_by_tags(&self, tags: Vec) -> Result, Error> { let configuration: &configuration::Configuration = self.configuration.borrow(); let client = &configuration.client; @@ -125,7 +125,7 @@ impl PetApi for PetApiClient { Ok(client.execute(req)?.error_for_status()?.json()?) } - fn get_pet_by_id(&self, pet_id: i64) -> Result<::models::Pet, Error> { + fn get_pet_by_id(&self, pet_id: i64) -> Result { let configuration: &configuration::Configuration = self.configuration.borrow(); let client = &configuration.client; @@ -150,7 +150,7 @@ impl PetApi for PetApiClient { Ok(client.execute(req)?.error_for_status()?.json()?) } - fn update_pet(&self, body: ::models::Pet) -> Result<(), Error> { + fn update_pet(&self, body: crate::models::Pet) -> Result<(), Error> { let configuration: &configuration::Configuration = self.configuration.borrow(); let client = &configuration.client; @@ -197,7 +197,7 @@ impl PetApi for PetApiClient { Ok(()) } - fn upload_file(&self, pet_id: i64, additional_metadata: &str, file: std::path::PathBuf) -> Result<::models::ApiResponse, Error> { + fn upload_file(&self, pet_id: i64, additional_metadata: &str, file: std::path::PathBuf) -> Result { let configuration: &configuration::Configuration = self.configuration.borrow(); let client = &configuration.client; diff --git a/samples/client/petstore/rust-reqwest/src/apis/store_api.rs b/samples/client/petstore/rust-reqwest/src/apis/store_api.rs index d9d60f09960..dac744b3b21 100644 --- a/samples/client/petstore/rust-reqwest/src/apis/store_api.rs +++ b/samples/client/petstore/rust-reqwest/src/apis/store_api.rs @@ -30,8 +30,8 @@ impl StoreApiClient { pub trait StoreApi { fn delete_order(&self, order_id: &str) -> Result<(), Error>; fn get_inventory(&self, ) -> Result<::std::collections::HashMap, Error>; - fn get_order_by_id(&self, order_id: i64) -> Result<::models::Order, Error>; - fn place_order(&self, body: ::models::Order) -> Result<::models::Order, Error>; + fn get_order_by_id(&self, order_id: i64) -> Result; + fn place_order(&self, body: crate::models::Order) -> Result; } impl StoreApi for StoreApiClient { @@ -78,7 +78,7 @@ impl StoreApi for StoreApiClient { Ok(client.execute(req)?.error_for_status()?.json()?) } - fn get_order_by_id(&self, order_id: i64) -> Result<::models::Order, Error> { + fn get_order_by_id(&self, order_id: i64) -> Result { let configuration: &configuration::Configuration = self.configuration.borrow(); let client = &configuration.client; @@ -95,7 +95,7 @@ impl StoreApi for StoreApiClient { Ok(client.execute(req)?.error_for_status()?.json()?) } - fn place_order(&self, body: ::models::Order) -> Result<::models::Order, Error> { + fn place_order(&self, body: crate::models::Order) -> Result { let configuration: &configuration::Configuration = self.configuration.borrow(); let client = &configuration.client; diff --git a/samples/client/petstore/rust-reqwest/src/apis/user_api.rs b/samples/client/petstore/rust-reqwest/src/apis/user_api.rs index 68d4c9f1266..e2321b3daa4 100644 --- a/samples/client/petstore/rust-reqwest/src/apis/user_api.rs +++ b/samples/client/petstore/rust-reqwest/src/apis/user_api.rs @@ -28,18 +28,18 @@ impl UserApiClient { } pub trait UserApi { - fn create_user(&self, body: ::models::User) -> Result<(), Error>; - fn create_users_with_array_input(&self, body: Vec<::models::User>) -> Result<(), Error>; - fn create_users_with_list_input(&self, body: Vec<::models::User>) -> Result<(), Error>; + fn create_user(&self, body: crate::models::User) -> Result<(), Error>; + fn create_users_with_array_input(&self, body: Vec) -> Result<(), Error>; + fn create_users_with_list_input(&self, body: Vec) -> Result<(), Error>; fn delete_user(&self, username: &str) -> Result<(), Error>; - fn get_user_by_name(&self, username: &str) -> Result<::models::User, Error>; + fn get_user_by_name(&self, username: &str) -> Result; fn login_user(&self, username: &str, password: &str) -> Result; fn logout_user(&self, ) -> Result<(), Error>; - fn update_user(&self, username: &str, body: ::models::User) -> Result<(), Error>; + fn update_user(&self, username: &str, body: crate::models::User) -> Result<(), Error>; } impl UserApi for UserApiClient { - fn create_user(&self, body: ::models::User) -> Result<(), Error> { + fn create_user(&self, body: crate::models::User) -> Result<(), Error> { let configuration: &configuration::Configuration = self.configuration.borrow(); let client = &configuration.client; @@ -58,7 +58,7 @@ impl UserApi for UserApiClient { Ok(()) } - fn create_users_with_array_input(&self, body: Vec<::models::User>) -> Result<(), Error> { + fn create_users_with_array_input(&self, body: Vec) -> Result<(), Error> { let configuration: &configuration::Configuration = self.configuration.borrow(); let client = &configuration.client; @@ -77,7 +77,7 @@ impl UserApi for UserApiClient { Ok(()) } - fn create_users_with_list_input(&self, body: Vec<::models::User>) -> Result<(), Error> { + fn create_users_with_list_input(&self, body: Vec) -> Result<(), Error> { let configuration: &configuration::Configuration = self.configuration.borrow(); let client = &configuration.client; @@ -114,7 +114,7 @@ impl UserApi for UserApiClient { Ok(()) } - fn get_user_by_name(&self, username: &str) -> Result<::models::User, Error> { + fn get_user_by_name(&self, username: &str) -> Result { let configuration: &configuration::Configuration = self.configuration.borrow(); let client = &configuration.client; @@ -168,7 +168,7 @@ impl UserApi for UserApiClient { Ok(()) } - fn update_user(&self, username: &str, body: ::models::User) -> Result<(), Error> { + fn update_user(&self, username: &str, body: crate::models::User) -> Result<(), Error> { let configuration: &configuration::Configuration = self.configuration.borrow(); let client = &configuration.client; diff --git a/samples/client/petstore/rust-reqwest/src/models/api_response.rs b/samples/client/petstore/rust-reqwest/src/models/api_response.rs index 7884fba590e..814483602dd 100644 --- a/samples/client/petstore/rust-reqwest/src/models/api_response.rs +++ b/samples/client/petstore/rust-reqwest/src/models/api_response.rs @@ -10,9 +10,6 @@ /// ApiResponse : Describes the result of uploading an image resource -#[allow(unused_imports)] -use serde_json::Value; - #[derive(Debug, Serialize, Deserialize)] pub struct ApiResponse { diff --git a/samples/client/petstore/rust-reqwest/src/models/category.rs b/samples/client/petstore/rust-reqwest/src/models/category.rs index 804f9f4c707..8cb5797ee1c 100644 --- a/samples/client/petstore/rust-reqwest/src/models/category.rs +++ b/samples/client/petstore/rust-reqwest/src/models/category.rs @@ -10,9 +10,6 @@ /// Category : A category for a pet -#[allow(unused_imports)] -use serde_json::Value; - #[derive(Debug, Serialize, Deserialize)] pub struct Category { diff --git a/samples/client/petstore/rust-reqwest/src/models/order.rs b/samples/client/petstore/rust-reqwest/src/models/order.rs index 118dc310767..24ad342497a 100644 --- a/samples/client/petstore/rust-reqwest/src/models/order.rs +++ b/samples/client/petstore/rust-reqwest/src/models/order.rs @@ -10,9 +10,6 @@ /// Order : An order for a pets from the pet store -#[allow(unused_imports)] -use serde_json::Value; - #[derive(Debug, Serialize, Deserialize)] pub struct Order { diff --git a/samples/client/petstore/rust-reqwest/src/models/pet.rs b/samples/client/petstore/rust-reqwest/src/models/pet.rs index 64dae06e454..e3c61239cdc 100644 --- a/samples/client/petstore/rust-reqwest/src/models/pet.rs +++ b/samples/client/petstore/rust-reqwest/src/models/pet.rs @@ -10,22 +10,19 @@ /// Pet : A pet for sale in the pet store -#[allow(unused_imports)] -use serde_json::Value; - #[derive(Debug, Serialize, Deserialize)] pub struct Pet { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "category", skip_serializing_if = "Option::is_none")] - pub category: Option<::models::Category>, + pub category: Option, #[serde(rename = "name")] pub name: String, #[serde(rename = "photoUrls")] pub photo_urls: Vec, #[serde(rename = "tags", skip_serializing_if = "Option::is_none")] - pub tags: Option>, + pub tags: Option>, /// pet status in the store #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, diff --git a/samples/client/petstore/rust-reqwest/src/models/tag.rs b/samples/client/petstore/rust-reqwest/src/models/tag.rs index 503fb7f61bd..c7cbdf2cc05 100644 --- a/samples/client/petstore/rust-reqwest/src/models/tag.rs +++ b/samples/client/petstore/rust-reqwest/src/models/tag.rs @@ -10,9 +10,6 @@ /// Tag : A tag for a pet -#[allow(unused_imports)] -use serde_json::Value; - #[derive(Debug, Serialize, Deserialize)] pub struct Tag { diff --git a/samples/client/petstore/rust-reqwest/src/models/user.rs b/samples/client/petstore/rust-reqwest/src/models/user.rs index 6bfa6e2167a..e54ed701306 100644 --- a/samples/client/petstore/rust-reqwest/src/models/user.rs +++ b/samples/client/petstore/rust-reqwest/src/models/user.rs @@ -10,9 +10,6 @@ /// User : A User who is purchasing from the pet store -#[allow(unused_imports)] -use serde_json::Value; - #[derive(Debug, Serialize, Deserialize)] pub struct User { diff --git a/samples/client/petstore/rust/.openapi-generator/VERSION b/samples/client/petstore/rust/.openapi-generator/VERSION index d96260ba335..83a328a9227 100644 --- a/samples/client/petstore/rust/.openapi-generator/VERSION +++ b/samples/client/petstore/rust/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.2-SNAPSHOT \ No newline at end of file +4.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/rust/docs/Pet.md b/samples/client/petstore/rust/docs/Pet.md index 53a462e68b9..2c8ea36dd91 100644 --- a/samples/client/petstore/rust/docs/Pet.md +++ b/samples/client/petstore/rust/docs/Pet.md @@ -5,10 +5,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **i64** | | [optional] -**category** | [***::models::Category**](Category.md) | | [optional] +**category** | [***crate::models::Category**](Category.md) | | [optional] **name** | **String** | | **photo_urls** | **Vec** | | -**tags** | [**Vec<::models::Tag>**](Tag.md) | | [optional] +**tags** | [**Vec**](Tag.md) | | [optional] **status** | **String** | pet status in the store | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/rust/docs/PetApi.md b/samples/client/petstore/rust/docs/PetApi.md index e690c805185..4d5e4c7839b 100644 --- a/samples/client/petstore/rust/docs/PetApi.md +++ b/samples/client/petstore/rust/docs/PetApi.md @@ -85,7 +85,7 @@ Name | Type | Description | Notes ## find_pets_by_status -> Vec<::models::Pet> find_pets_by_status(ctx, status) +> Vec find_pets_by_status(ctx, status) Finds Pets by status Multiple status values can be provided with comma separated strings @@ -100,7 +100,7 @@ Name | Type | Description | Notes ### Return type -[**Vec<::models::Pet>**](Pet.md) +[**Vec**](Pet.md) ### Authorization @@ -116,7 +116,7 @@ Name | Type | Description | Notes ## find_pets_by_tags -> Vec<::models::Pet> find_pets_by_tags(ctx, tags) +> Vec find_pets_by_tags(ctx, tags) Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. @@ -131,7 +131,7 @@ Name | Type | Description | Notes ### Return type -[**Vec<::models::Pet>**](Pet.md) +[**Vec**](Pet.md) ### Authorization @@ -147,7 +147,7 @@ Name | Type | Description | Notes ## get_pet_by_id -> ::models::Pet get_pet_by_id(ctx, pet_id) +> crate::models::Pet get_pet_by_id(ctx, pet_id) Find pet by ID Returns a single pet @@ -162,7 +162,7 @@ Name | Type | Description | Notes ### Return type -[**::models::Pet**](Pet.md) +[**crate::models::Pet**](Pet.md) ### Authorization @@ -247,7 +247,7 @@ Name | Type | Description | Notes ## upload_file -> ::models::ApiResponse upload_file(ctx, pet_id, optional) +> crate::models::ApiResponse upload_file(ctx, pet_id, optional) uploads an image ### Required Parameters @@ -271,7 +271,7 @@ Name | Type | Description | Notes ### Return type -[**::models::ApiResponse**](ApiResponse.md) +[**crate::models::ApiResponse**](ApiResponse.md) ### Authorization diff --git a/samples/client/petstore/rust/docs/StoreApi.md b/samples/client/petstore/rust/docs/StoreApi.md index 1e4bdc3e14a..16a09fae3fa 100644 --- a/samples/client/petstore/rust/docs/StoreApi.md +++ b/samples/client/petstore/rust/docs/StoreApi.md @@ -70,7 +70,7 @@ This endpoint does not need any parameter. ## get_order_by_id -> ::models::Order get_order_by_id(order_id) +> crate::models::Order get_order_by_id(order_id) Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions @@ -84,7 +84,7 @@ Name | Type | Description | Notes ### Return type -[**::models::Order**](Order.md) +[**crate::models::Order**](Order.md) ### Authorization @@ -100,7 +100,7 @@ No authorization required ## place_order -> ::models::Order place_order(body) +> crate::models::Order place_order(body) Place an order for a pet ### Required Parameters @@ -112,7 +112,7 @@ Name | Type | Description | Notes ### Return type -[**::models::Order**](Order.md) +[**crate::models::Order**](Order.md) ### Authorization diff --git a/samples/client/petstore/rust/docs/UserApi.md b/samples/client/petstore/rust/docs/UserApi.md index ffa733d64de..9c4af81392a 100644 --- a/samples/client/petstore/rust/docs/UserApi.md +++ b/samples/client/petstore/rust/docs/UserApi.md @@ -55,7 +55,7 @@ Creates list of users with given input array Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**Vec<::models::User>**](User.md)| List of user object | + **body** | [**Vec**](User.md)| List of user object | ### Return type @@ -83,7 +83,7 @@ Creates list of users with given input array Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**Vec<::models::User>**](User.md)| List of user object | + **body** | [**Vec**](User.md)| List of user object | ### Return type @@ -133,7 +133,7 @@ No authorization required ## get_user_by_name -> ::models::User get_user_by_name(username) +> crate::models::User get_user_by_name(username) Get user by user name ### Required Parameters @@ -145,7 +145,7 @@ Name | Type | Description | Notes ### Return type -[**::models::User**](User.md) +[**crate::models::User**](User.md) ### Authorization diff --git a/samples/client/petstore/rust/src/apis/client.rs b/samples/client/petstore/rust/src/apis/client.rs index ddf5f6ee086..dd0de97eb53 100644 --- a/samples/client/petstore/rust/src/apis/client.rs +++ b/samples/client/petstore/rust/src/apis/client.rs @@ -5,9 +5,9 @@ use super::configuration::Configuration; pub struct APIClient { configuration: Rc>, - pet_api: Box<::apis::PetApi>, - store_api: Box<::apis::StoreApi>, - user_api: Box<::apis::UserApi>, + pet_api: Box, + store_api: Box, + user_api: Box, } impl APIClient { @@ -16,21 +16,21 @@ impl APIClient { APIClient { configuration: rc.clone(), - pet_api: Box::new(::apis::PetApiClient::new(rc.clone())), - store_api: Box::new(::apis::StoreApiClient::new(rc.clone())), - user_api: Box::new(::apis::UserApiClient::new(rc.clone())), + pet_api: Box::new(crate::apis::PetApiClient::new(rc.clone())), + store_api: Box::new(crate::apis::StoreApiClient::new(rc.clone())), + user_api: Box::new(crate::apis::UserApiClient::new(rc.clone())), } } - pub fn pet_api(&self) -> &::apis::PetApi{ + pub fn pet_api(&self) -> &crate::apis::PetApi{ self.pet_api.as_ref() } - pub fn store_api(&self) -> &::apis::StoreApi{ + pub fn store_api(&self) -> &crate::apis::StoreApi{ self.store_api.as_ref() } - pub fn user_api(&self) -> &::apis::UserApi{ + pub fn user_api(&self) -> &crate::apis::UserApi{ self.user_api.as_ref() } diff --git a/samples/client/petstore/rust/src/apis/pet_api.rs b/samples/client/petstore/rust/src/apis/pet_api.rs index 0c98efec5cf..e3fe372fc9b 100644 --- a/samples/client/petstore/rust/src/apis/pet_api.rs +++ b/samples/client/petstore/rust/src/apis/pet_api.rs @@ -31,19 +31,19 @@ impl PetApiClient { } pub trait PetApi { - fn add_pet(&self, body: ::models::Pet) -> Box>>; + fn add_pet(&self, body: crate::models::Pet) -> Box>>; fn delete_pet(&self, pet_id: i64, api_key: &str) -> Box>>; - fn find_pets_by_status(&self, status: Vec) -> Box, Error = Error>>; - fn find_pets_by_tags(&self, tags: Vec) -> Box, Error = Error>>; - fn get_pet_by_id(&self, pet_id: i64) -> Box>>; - fn update_pet(&self, body: ::models::Pet) -> Box>>; + fn find_pets_by_status(&self, status: Vec) -> Box, Error = Error>>; + fn find_pets_by_tags(&self, tags: Vec) -> Box, Error = Error>>; + fn get_pet_by_id(&self, pet_id: i64) -> Box>>; + fn update_pet(&self, body: crate::models::Pet) -> Box>>; fn update_pet_with_form(&self, pet_id: i64, name: &str, status: &str) -> Box>>; - fn upload_file(&self, pet_id: i64, additional_metadata: &str, file: std::path::PathBuf) -> Box>>; + fn upload_file(&self, pet_id: i64, additional_metadata: &str, file: std::path::PathBuf) -> Box>>; } implPetApi for PetApiClient { - fn add_pet(&self, body: ::models::Pet) -> Box>> { + fn add_pet(&self, body: crate::models::Pet) -> Box>> { __internal_request::Request::new(hyper::Method::Post, "/pet".to_string()) .with_auth(__internal_request::Auth::Oauth) .with_body_param(body) @@ -60,21 +60,21 @@ implPetApi for PetApiClient { .execute(self.configuration.borrow()) } - fn find_pets_by_status(&self, status: Vec) -> Box, Error = Error>> { + fn find_pets_by_status(&self, status: Vec) -> Box, Error = Error>> { __internal_request::Request::new(hyper::Method::Get, "/pet/findByStatus".to_string()) .with_auth(__internal_request::Auth::Oauth) .with_query_param("status".to_string(), status.join(",").to_string()) .execute(self.configuration.borrow()) } - fn find_pets_by_tags(&self, tags: Vec) -> Box, Error = Error>> { + fn find_pets_by_tags(&self, tags: Vec) -> Box, Error = Error>> { __internal_request::Request::new(hyper::Method::Get, "/pet/findByTags".to_string()) .with_auth(__internal_request::Auth::Oauth) .with_query_param("tags".to_string(), tags.join(",").to_string()) .execute(self.configuration.borrow()) } - fn get_pet_by_id(&self, pet_id: i64) -> Box>> { + fn get_pet_by_id(&self, pet_id: i64) -> Box>> { __internal_request::Request::new(hyper::Method::Get, "/pet/{petId}".to_string()) .with_auth(__internal_request::Auth::ApiKey(__internal_request::ApiKey{ in_header: true, @@ -85,7 +85,7 @@ implPetApi for PetApiClient { .execute(self.configuration.borrow()) } - fn update_pet(&self, body: ::models::Pet) -> Box>> { + fn update_pet(&self, body: crate::models::Pet) -> Box>> { __internal_request::Request::new(hyper::Method::Put, "/pet".to_string()) .with_auth(__internal_request::Auth::Oauth) .with_body_param(body) @@ -103,7 +103,7 @@ implPetApi for PetApiClient { .execute(self.configuration.borrow()) } - fn upload_file(&self, pet_id: i64, additional_metadata: &str, file: std::path::PathBuf) -> Box>> { + fn upload_file(&self, pet_id: i64, additional_metadata: &str, file: std::path::PathBuf) -> Box>> { __internal_request::Request::new(hyper::Method::Post, "/pet/{petId}/uploadImage".to_string()) .with_auth(__internal_request::Auth::Oauth) .with_path_param("petId".to_string(), pet_id.to_string()) diff --git a/samples/client/petstore/rust/src/apis/store_api.rs b/samples/client/petstore/rust/src/apis/store_api.rs index 46f0bf53cf4..2c827cce045 100644 --- a/samples/client/petstore/rust/src/apis/store_api.rs +++ b/samples/client/petstore/rust/src/apis/store_api.rs @@ -33,8 +33,8 @@ impl StoreApiClient { pub trait StoreApi { fn delete_order(&self, order_id: &str) -> Box>>; fn get_inventory(&self, ) -> Box, Error = Error>>; - fn get_order_by_id(&self, order_id: i64) -> Box>>; - fn place_order(&self, body: ::models::Order) -> Box>>; + fn get_order_by_id(&self, order_id: i64) -> Box>>; + fn place_order(&self, body: crate::models::Order) -> Box>>; } @@ -56,13 +56,13 @@ implStoreApi for StoreApiClient { .execute(self.configuration.borrow()) } - fn get_order_by_id(&self, order_id: i64) -> Box>> { + fn get_order_by_id(&self, order_id: i64) -> Box>> { __internal_request::Request::new(hyper::Method::Get, "/store/order/{orderId}".to_string()) .with_path_param("orderId".to_string(), order_id.to_string()) .execute(self.configuration.borrow()) } - fn place_order(&self, body: ::models::Order) -> Box>> { + fn place_order(&self, body: crate::models::Order) -> Box>> { __internal_request::Request::new(hyper::Method::Post, "/store/order".to_string()) .with_body_param(body) .execute(self.configuration.borrow()) diff --git a/samples/client/petstore/rust/src/apis/user_api.rs b/samples/client/petstore/rust/src/apis/user_api.rs index ba3ad140b46..1ea00f7536d 100644 --- a/samples/client/petstore/rust/src/apis/user_api.rs +++ b/samples/client/petstore/rust/src/apis/user_api.rs @@ -31,33 +31,33 @@ impl UserApiClient { } pub trait UserApi { - fn create_user(&self, body: ::models::User) -> Box>>; - fn create_users_with_array_input(&self, body: Vec<::models::User>) -> Box>>; - fn create_users_with_list_input(&self, body: Vec<::models::User>) -> Box>>; + fn create_user(&self, body: crate::models::User) -> Box>>; + fn create_users_with_array_input(&self, body: Vec) -> Box>>; + fn create_users_with_list_input(&self, body: Vec) -> Box>>; fn delete_user(&self, username: &str) -> Box>>; - fn get_user_by_name(&self, username: &str) -> Box>>; + fn get_user_by_name(&self, username: &str) -> Box>>; fn login_user(&self, username: &str, password: &str) -> Box>>; fn logout_user(&self, ) -> Box>>; - fn update_user(&self, username: &str, body: ::models::User) -> Box>>; + fn update_user(&self, username: &str, body: crate::models::User) -> Box>>; } implUserApi for UserApiClient { - fn create_user(&self, body: ::models::User) -> Box>> { + fn create_user(&self, body: crate::models::User) -> Box>> { __internal_request::Request::new(hyper::Method::Post, "/user".to_string()) .with_body_param(body) .returns_nothing() .execute(self.configuration.borrow()) } - fn create_users_with_array_input(&self, body: Vec<::models::User>) -> Box>> { + fn create_users_with_array_input(&self, body: Vec) -> Box>> { __internal_request::Request::new(hyper::Method::Post, "/user/createWithArray".to_string()) .with_body_param(body) .returns_nothing() .execute(self.configuration.borrow()) } - fn create_users_with_list_input(&self, body: Vec<::models::User>) -> Box>> { + fn create_users_with_list_input(&self, body: Vec) -> Box>> { __internal_request::Request::new(hyper::Method::Post, "/user/createWithList".to_string()) .with_body_param(body) .returns_nothing() @@ -71,7 +71,7 @@ implUserApi for UserApiClient { .execute(self.configuration.borrow()) } - fn get_user_by_name(&self, username: &str) -> Box>> { + fn get_user_by_name(&self, username: &str) -> Box>> { __internal_request::Request::new(hyper::Method::Get, "/user/{username}".to_string()) .with_path_param("username".to_string(), username.to_string()) .execute(self.configuration.borrow()) @@ -90,7 +90,7 @@ implUserApi for UserApiClient { .execute(self.configuration.borrow()) } - fn update_user(&self, username: &str, body: ::models::User) -> Box>> { + fn update_user(&self, username: &str, body: crate::models::User) -> Box>> { __internal_request::Request::new(hyper::Method::Put, "/user/{username}".to_string()) .with_path_param("username".to_string(), username.to_string()) .with_body_param(body) diff --git a/samples/client/petstore/rust/src/models/api_response.rs b/samples/client/petstore/rust/src/models/api_response.rs index 7884fba590e..814483602dd 100644 --- a/samples/client/petstore/rust/src/models/api_response.rs +++ b/samples/client/petstore/rust/src/models/api_response.rs @@ -10,9 +10,6 @@ /// ApiResponse : Describes the result of uploading an image resource -#[allow(unused_imports)] -use serde_json::Value; - #[derive(Debug, Serialize, Deserialize)] pub struct ApiResponse { diff --git a/samples/client/petstore/rust/src/models/category.rs b/samples/client/petstore/rust/src/models/category.rs index 804f9f4c707..8cb5797ee1c 100644 --- a/samples/client/petstore/rust/src/models/category.rs +++ b/samples/client/petstore/rust/src/models/category.rs @@ -10,9 +10,6 @@ /// Category : A category for a pet -#[allow(unused_imports)] -use serde_json::Value; - #[derive(Debug, Serialize, Deserialize)] pub struct Category { diff --git a/samples/client/petstore/rust/src/models/order.rs b/samples/client/petstore/rust/src/models/order.rs index 118dc310767..24ad342497a 100644 --- a/samples/client/petstore/rust/src/models/order.rs +++ b/samples/client/petstore/rust/src/models/order.rs @@ -10,9 +10,6 @@ /// Order : An order for a pets from the pet store -#[allow(unused_imports)] -use serde_json::Value; - #[derive(Debug, Serialize, Deserialize)] pub struct Order { diff --git a/samples/client/petstore/rust/src/models/pet.rs b/samples/client/petstore/rust/src/models/pet.rs index 64dae06e454..e3c61239cdc 100644 --- a/samples/client/petstore/rust/src/models/pet.rs +++ b/samples/client/petstore/rust/src/models/pet.rs @@ -10,22 +10,19 @@ /// Pet : A pet for sale in the pet store -#[allow(unused_imports)] -use serde_json::Value; - #[derive(Debug, Serialize, Deserialize)] pub struct Pet { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "category", skip_serializing_if = "Option::is_none")] - pub category: Option<::models::Category>, + pub category: Option, #[serde(rename = "name")] pub name: String, #[serde(rename = "photoUrls")] pub photo_urls: Vec, #[serde(rename = "tags", skip_serializing_if = "Option::is_none")] - pub tags: Option>, + pub tags: Option>, /// pet status in the store #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, diff --git a/samples/client/petstore/rust/src/models/tag.rs b/samples/client/petstore/rust/src/models/tag.rs index 503fb7f61bd..c7cbdf2cc05 100644 --- a/samples/client/petstore/rust/src/models/tag.rs +++ b/samples/client/petstore/rust/src/models/tag.rs @@ -10,9 +10,6 @@ /// Tag : A tag for a pet -#[allow(unused_imports)] -use serde_json::Value; - #[derive(Debug, Serialize, Deserialize)] pub struct Tag { diff --git a/samples/client/petstore/rust/src/models/user.rs b/samples/client/petstore/rust/src/models/user.rs index 6bfa6e2167a..e54ed701306 100644 --- a/samples/client/petstore/rust/src/models/user.rs +++ b/samples/client/petstore/rust/src/models/user.rs @@ -10,9 +10,6 @@ /// User : A User who is purchasing from the pet store -#[allow(unused_imports)] -use serde_json::Value; - #[derive(Debug, Serialize, Deserialize)] pub struct User {