From 636820b541d7586d604c4d2272f61647b83f76a8 Mon Sep 17 00:00:00 2001 From: devhl-labs Date: Wed, 13 Jul 2022 04:48:23 -0400 Subject: [PATCH] Add nonNullableVars to CodegenModel (#12815) * added nonNullableVars * build samples --- .../openapitools/codegen/CodegenModel.java | 14 ++++++++- .../openapitools/codegen/DefaultCodegen.java | 8 +++++ .../rust/hyper/petstore/docs/PetApi.md | 18 +++++------ .../rust/hyper/petstore/docs/StoreApi.md | 8 ++--- .../rust/hyper/petstore/src/apis/pet_api.rs | 26 ++++++++-------- .../rust/hyper/petstore/src/apis/store_api.rs | 12 ++++---- .../reqwest/petstore-async/docs/PetApi.md | 18 +++++------ .../reqwest/petstore-async/docs/StoreApi.md | 8 ++--- .../petstore-async/src/apis/pet_api.rs | 30 +++++++++---------- .../petstore-async/src/apis/store_api.rs | 12 ++++---- .../petstore-awsv4signature/docs/PetApi.md | 18 +++++------ .../petstore-awsv4signature/docs/StoreApi.md | 8 ++--- .../src/apis/pet_api.rs | 18 +++++------ .../src/apis/store_api.rs | 8 ++--- .../rust/reqwest/petstore/docs/PetApi.md | 18 +++++------ .../rust/reqwest/petstore/docs/StoreApi.md | 8 ++--- .../rust/reqwest/petstore/src/apis/pet_api.rs | 18 +++++------ .../reqwest/petstore/src/apis/store_api.rs | 8 ++--- 18 files changed, 139 insertions(+), 119 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java index b4a7160538a..a8107fb07d0 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java @@ -75,6 +75,7 @@ public class CodegenModel implements IJsonSchemaValidationProperties { public List readOnlyVars = new ArrayList<>(); // a list of read-only properties public List readWriteVars = new ArrayList<>(); // a list of properties for read, write public List parentVars = new ArrayList<>(); + public List nonNullableVars = new ArrayList<>(); // a list of non-nullable properties public Map allowableValues; // Sorted sets of required parameters. @@ -196,6 +197,14 @@ public class CodegenModel implements IJsonSchemaValidationProperties { this.allVars = allVars; } + public List getNonNullableVars() { + return nonNullableVars; + } + + public void setNonNullableVars(List nonNullableVars) { + this.nonNullableVars = nonNullableVars; + } + public Map getAllowableValues() { return allowableValues; } @@ -947,6 +956,7 @@ public class CodegenModel implements IJsonSchemaValidationProperties { Objects.equals(arrayModelType, that.arrayModelType) && Objects.equals(vars, that.vars) && Objects.equals(allVars, that.allVars) && + Objects.equals(nonNullableVars, that.nonNullableVars) && Objects.equals(requiredVars, that.requiredVars) && Objects.equals(optionalVars, that.optionalVars) && Objects.equals(readOnlyVars, that.readOnlyVars) && @@ -982,7 +992,7 @@ public class CodegenModel implements IJsonSchemaValidationProperties { getXmlName(), getClassFilename(), getUnescapedDescription(), getDiscriminator(), getDefaultValue(), getArrayModelType(), isAlias, isString, isInteger, isLong, isNumber, isNumeric, isFloat, isDouble, isDate, isDateTime, isNull, hasValidation, isShort, isUnboundedInteger, isBoolean, - getVars(), getAllVars(), getRequiredVars(), getOptionalVars(), getReadOnlyVars(), getReadWriteVars(), + getVars(), getAllVars(), getNonNullableVars(), getRequiredVars(), getOptionalVars(), getReadOnlyVars(), getReadWriteVars(), getParentVars(), getAllowableValues(), getMandatory(), getAllMandatory(), getImports(), hasVars, isEmptyVars(), hasMoreModels, hasEnums, isEnum, isNullable, hasRequired, hasOptional, isArray, hasChildren, isMap, isDeprecated, hasOnlyReadOnly, getExternalDocumentation(), getVendorExtensions(), @@ -1036,6 +1046,7 @@ public class CodegenModel implements IJsonSchemaValidationProperties { sb.append(", isDateTime=").append(isDateTime); sb.append(", vars=").append(vars); sb.append(", allVars=").append(allVars); + sb.append(", nonNullableVars=").append(nonNullableVars); sb.append(", requiredVars=").append(requiredVars); sb.append(", optionalVars=").append(optionalVars); sb.append(", readOnlyVars=").append(readOnlyVars); @@ -1123,6 +1134,7 @@ public class CodegenModel implements IJsonSchemaValidationProperties { requiredVars = removeDuplicatedProperty(requiredVars); parentVars = removeDuplicatedProperty(parentVars); allVars = removeDuplicatedProperty(allVars); + nonNullableVars = removeDuplicatedProperty(nonNullableVars); readOnlyVars = removeDuplicatedProperty(readOnlyVars); readWriteVars = removeDuplicatedProperty(readWriteVars); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index 3246115b6f8..36093d46d8c 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java @@ -698,6 +698,10 @@ public class DefaultCodegen implements CodegenConfig { updateCodegenPropertyEnum(var); } + for (CodegenProperty var : cm.nonNullableVars) { + updateCodegenPropertyEnum(var); + } + for (CodegenProperty var : cm.requiredVars) { updateCodegenPropertyEnum(var); } @@ -5453,6 +5457,10 @@ public class DefaultCodegen implements CodegenConfig { // duplicated properties will be removed by removeAllDuplicatedProperty later cm.readWriteVars.add(cp); } + + if (Boolean.FALSE.equals(cp.isNullable)){ + cm.nonNullableVars.add(cp); + } } } return; diff --git a/samples/client/petstore/rust/hyper/petstore/docs/PetApi.md b/samples/client/petstore/rust/hyper/petstore/docs/PetApi.md index 7deea32cd81..b94b34a8a32 100644 --- a/samples/client/petstore/rust/hyper/petstore/docs/PetApi.md +++ b/samples/client/petstore/rust/hyper/petstore/docs/PetApi.md @@ -47,7 +47,7 @@ Name | Type | Description | Required | Notes ## delete_pet -> delete_pet(pet_id, api_key) +> delete_pet(petid, api_key) Deletes a pet @@ -57,7 +57,7 @@ Deletes a pet Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**pet_id** | **i64** | Pet id to delete | [required] | +**petid** | **i64** | Pet id to delete | [required] | **api_key** | Option<**String**> | | | ### Return type @@ -138,7 +138,7 @@ Name | Type | Description | Required | Notes ## get_pet_by_id -> crate::models::Pet get_pet_by_id(pet_id) +> crate::models::Pet get_pet_by_id(petid) Find pet by ID Returns a single pet @@ -148,7 +148,7 @@ Returns a single pet Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**pet_id** | **i64** | ID of pet to return | [required] | +**petid** | **i64** | ID of pet to return | [required] | ### Return type @@ -198,7 +198,7 @@ Name | Type | Description | Required | Notes ## update_pet_with_form -> update_pet_with_form(pet_id, name, status) +> update_pet_with_form(petid, name, status) Updates a pet in the store with form data @@ -208,7 +208,7 @@ Updates a pet in the store with form data Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**pet_id** | **i64** | ID of pet that needs to be updated | [required] | +**petid** | **i64** | ID of pet that needs to be updated | [required] | **name** | Option<**String**> | Updated name of the pet | | **status** | Option<**String**> | Updated status of the pet | | @@ -230,7 +230,7 @@ Name | Type | Description | Required | Notes ## upload_file -> crate::models::ApiResponse upload_file(pet_id, additional_metadata, file) +> crate::models::ApiResponse upload_file(petid, additionalmetadata, file) uploads an image @@ -240,8 +240,8 @@ uploads an image Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**pet_id** | **i64** | ID of pet to update | [required] | -**additional_metadata** | Option<**String**> | Additional data to pass to server | | +**petid** | **i64** | ID of pet to update | [required] | +**additionalmetadata** | Option<**String**> | Additional data to pass to server | | **file** | Option<**std::path::PathBuf**> | file to upload | | ### Return type diff --git a/samples/client/petstore/rust/hyper/petstore/docs/StoreApi.md b/samples/client/petstore/rust/hyper/petstore/docs/StoreApi.md index c1f5b5a9c21..9b37fc16da5 100644 --- a/samples/client/petstore/rust/hyper/petstore/docs/StoreApi.md +++ b/samples/client/petstore/rust/hyper/petstore/docs/StoreApi.md @@ -13,7 +13,7 @@ Method | HTTP request | Description ## delete_order -> delete_order(order_id) +> delete_order(orderid) Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors @@ -23,7 +23,7 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or non Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**order_id** | **String** | ID of the order that needs to be deleted | [required] | +**orderid** | **String** | ID of the order that needs to be deleted | [required] | ### Return type @@ -70,7 +70,7 @@ This endpoint does not need any parameter. ## get_order_by_id -> crate::models::Order get_order_by_id(order_id) +> crate::models::Order get_order_by_id(orderid) Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions @@ -80,7 +80,7 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**order_id** | **i64** | ID of pet that needs to be fetched | [required] | +**orderid** | **i64** | ID of pet that needs to be fetched | [required] | ### Return type diff --git a/samples/client/petstore/rust/hyper/petstore/src/apis/pet_api.rs b/samples/client/petstore/rust/hyper/petstore/src/apis/pet_api.rs index 019ed347cdf..4037e103f53 100644 --- a/samples/client/petstore/rust/hyper/petstore/src/apis/pet_api.rs +++ b/samples/client/petstore/rust/hyper/petstore/src/apis/pet_api.rs @@ -36,13 +36,13 @@ impl PetApiClient pub trait PetApi { fn add_pet(&self, pet: crate::models::Pet) -> Pin>>>; - fn delete_pet(&self, pet_id: i64, api_key: Option<&str>) -> Pin>>>; + fn delete_pet(&self, petid: i64, api_key: Option<&str>) -> Pin>>>; fn find_pets_by_status(&self, status: Vec) -> Pin, Error>>>>; fn find_pets_by_tags(&self, tags: Vec) -> Pin, Error>>>>; - fn get_pet_by_id(&self, pet_id: i64) -> Pin>>>; + fn get_pet_by_id(&self, petid: i64) -> Pin>>>; fn update_pet(&self, pet: crate::models::Pet) -> Pin>>>; - fn update_pet_with_form(&self, pet_id: i64, name: Option<&str>, status: Option<&str>) -> Pin>>>; - fn upload_file(&self, pet_id: i64, additional_metadata: Option<&str>, file: Option) -> Pin>>>; + fn update_pet_with_form(&self, petid: i64, name: Option<&str>, status: Option<&str>) -> Pin>>>; + fn upload_file(&self, petid: i64, additionalmetadata: Option<&str>, file: Option) -> Pin>>>; } implPetApi for PetApiClient @@ -58,11 +58,11 @@ implPetApi for PetApiClient } #[allow(unused_mut)] - fn delete_pet(&self, pet_id: i64, api_key: Option<&str>) -> Pin>>> { + fn delete_pet(&self, petid: i64, api_key: Option<&str>) -> Pin>>> { let mut req = __internal_request::Request::new(hyper::Method::DELETE, "/pet/{petId}".to_string()) .with_auth(__internal_request::Auth::Oauth) ; - req = req.with_path_param("petId".to_string(), pet_id.to_string()); + req = req.with_path_param("petId".to_string(), petid.to_string()); if let Some(param_value) = api_key { req = req.with_header_param("api_key".to_string(), param_value.to_string()); } @@ -92,7 +92,7 @@ implPetApi for PetApiClient } #[allow(unused_mut)] - fn get_pet_by_id(&self, pet_id: i64) -> Pin>>> { + fn get_pet_by_id(&self, petid: i64) -> Pin>>> { let mut req = __internal_request::Request::new(hyper::Method::GET, "/pet/{petId}".to_string()) .with_auth(__internal_request::Auth::ApiKey(__internal_request::ApiKey{ in_header: true, @@ -100,7 +100,7 @@ implPetApi for PetApiClient param_name: "api_key".to_owned(), })) ; - req = req.with_path_param("petId".to_string(), pet_id.to_string()); + req = req.with_path_param("petId".to_string(), petid.to_string()); req.execute(self.configuration.borrow()) } @@ -116,11 +116,11 @@ implPetApi for PetApiClient } #[allow(unused_mut)] - fn update_pet_with_form(&self, pet_id: i64, name: Option<&str>, status: Option<&str>) -> Pin>>> { + fn update_pet_with_form(&self, petid: i64, name: Option<&str>, status: Option<&str>) -> Pin>>> { let mut req = __internal_request::Request::new(hyper::Method::POST, "/pet/{petId}".to_string()) .with_auth(__internal_request::Auth::Oauth) ; - req = req.with_path_param("petId".to_string(), pet_id.to_string()); + req = req.with_path_param("petId".to_string(), petid.to_string()); if let Some(param_value) = name { req = req.with_form_param("name".to_string(), param_value.to_string()); } @@ -133,12 +133,12 @@ implPetApi for PetApiClient } #[allow(unused_mut)] - fn upload_file(&self, pet_id: i64, additional_metadata: Option<&str>, file: Option) -> Pin>>> { + fn upload_file(&self, petid: i64, additionalmetadata: Option<&str>, file: Option) -> Pin>>> { let mut req = __internal_request::Request::new(hyper::Method::POST, "/pet/{petId}/uploadImage".to_string()) .with_auth(__internal_request::Auth::Oauth) ; - req = req.with_path_param("petId".to_string(), pet_id.to_string()); - if let Some(param_value) = additional_metadata { + req = req.with_path_param("petId".to_string(), petid.to_string()); + if let Some(param_value) = additionalmetadata { req = req.with_form_param("additionalMetadata".to_string(), param_value.to_string()); } if let Some(param_value) = file { diff --git a/samples/client/petstore/rust/hyper/petstore/src/apis/store_api.rs b/samples/client/petstore/rust/hyper/petstore/src/apis/store_api.rs index e4bb5630828..0cdf1993eff 100644 --- a/samples/client/petstore/rust/hyper/petstore/src/apis/store_api.rs +++ b/samples/client/petstore/rust/hyper/petstore/src/apis/store_api.rs @@ -35,19 +35,19 @@ impl StoreApiClient } pub trait StoreApi { - fn delete_order(&self, order_id: &str) -> Pin>>>; + fn delete_order(&self, orderid: &str) -> Pin>>>; fn get_inventory(&self, ) -> Pin, Error>>>>; - fn get_order_by_id(&self, order_id: i64) -> Pin>>>; + fn get_order_by_id(&self, orderid: i64) -> Pin>>>; fn place_order(&self, order: crate::models::Order) -> Pin>>>; } implStoreApi for StoreApiClient where C: Clone + std::marker::Send + Sync { #[allow(unused_mut)] - fn delete_order(&self, order_id: &str) -> Pin>>> { + fn delete_order(&self, orderid: &str) -> Pin>>> { let mut req = __internal_request::Request::new(hyper::Method::DELETE, "/store/order/{orderId}".to_string()) ; - req = req.with_path_param("orderId".to_string(), order_id.to_string()); + req = req.with_path_param("orderId".to_string(), orderid.to_string()); req = req.returns_nothing(); req.execute(self.configuration.borrow()) @@ -67,10 +67,10 @@ implStoreApi for StoreApiClient } #[allow(unused_mut)] - fn get_order_by_id(&self, order_id: i64) -> Pin>>> { + fn get_order_by_id(&self, orderid: i64) -> Pin>>> { let mut req = __internal_request::Request::new(hyper::Method::GET, "/store/order/{orderId}".to_string()) ; - req = req.with_path_param("orderId".to_string(), order_id.to_string()); + req = req.with_path_param("orderId".to_string(), orderid.to_string()); req.execute(self.configuration.borrow()) } diff --git a/samples/client/petstore/rust/reqwest/petstore-async/docs/PetApi.md b/samples/client/petstore/rust/reqwest/petstore-async/docs/PetApi.md index 5adc9334151..3ac38fd18ae 100644 --- a/samples/client/petstore/rust/reqwest/petstore-async/docs/PetApi.md +++ b/samples/client/petstore/rust/reqwest/petstore-async/docs/PetApi.md @@ -47,7 +47,7 @@ Name | Type | Description | Required | Notes ## delete_pet -> delete_pet(pet_id, api_key) +> delete_pet(petid, api_key) Deletes a pet @@ -57,7 +57,7 @@ Deletes a pet Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**pet_id** | **i64** | Pet id to delete | [required] | +**petid** | **i64** | Pet id to delete | [required] | **api_key** | Option<**String**> | | | ### Return type @@ -138,7 +138,7 @@ Name | Type | Description | Required | Notes ## get_pet_by_id -> crate::models::Pet get_pet_by_id(pet_id) +> crate::models::Pet get_pet_by_id(petid) Find pet by ID Returns a single pet @@ -148,7 +148,7 @@ Returns a single pet Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**pet_id** | **i64** | ID of pet to return | [required] | +**petid** | **i64** | ID of pet to return | [required] | ### Return type @@ -198,7 +198,7 @@ Name | Type | Description | Required | Notes ## update_pet_with_form -> update_pet_with_form(pet_id, name, status) +> update_pet_with_form(petid, name, status) Updates a pet in the store with form data @@ -208,7 +208,7 @@ Updates a pet in the store with form data Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**pet_id** | **i64** | ID of pet that needs to be updated | [required] | +**petid** | **i64** | ID of pet that needs to be updated | [required] | **name** | Option<**String**> | Updated name of the pet | | **status** | Option<**String**> | Updated status of the pet | | @@ -230,7 +230,7 @@ Name | Type | Description | Required | Notes ## upload_file -> crate::models::ApiResponse upload_file(pet_id, additional_metadata, file) +> crate::models::ApiResponse upload_file(petid, additionalmetadata, file) uploads an image @@ -240,8 +240,8 @@ uploads an image Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**pet_id** | **i64** | ID of pet to update | [required] | -**additional_metadata** | Option<**String**> | Additional data to pass to server | | +**petid** | **i64** | ID of pet to update | [required] | +**additionalmetadata** | Option<**String**> | Additional data to pass to server | | **file** | Option<**std::path::PathBuf**> | file to upload | | ### Return type diff --git a/samples/client/petstore/rust/reqwest/petstore-async/docs/StoreApi.md b/samples/client/petstore/rust/reqwest/petstore-async/docs/StoreApi.md index a6b3c572ccc..364e7f93df6 100644 --- a/samples/client/petstore/rust/reqwest/petstore-async/docs/StoreApi.md +++ b/samples/client/petstore/rust/reqwest/petstore-async/docs/StoreApi.md @@ -13,7 +13,7 @@ Method | HTTP request | Description ## delete_order -> delete_order(order_id) +> delete_order(orderid) Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors @@ -23,7 +23,7 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or non Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**order_id** | **String** | ID of the order that needs to be deleted | [required] | +**orderid** | **String** | ID of the order that needs to be deleted | [required] | ### Return type @@ -70,7 +70,7 @@ This endpoint does not need any parameter. ## get_order_by_id -> crate::models::Order get_order_by_id(order_id) +> crate::models::Order get_order_by_id(orderid) Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions @@ -80,7 +80,7 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**order_id** | **i64** | ID of pet that needs to be fetched | [required] | +**orderid** | **i64** | ID of pet that needs to be fetched | [required] | ### Return type diff --git a/samples/client/petstore/rust/reqwest/petstore-async/src/apis/pet_api.rs b/samples/client/petstore/rust/reqwest/petstore-async/src/apis/pet_api.rs index 977d79edcf7..a9c0c537ee4 100644 --- a/samples/client/petstore/rust/reqwest/petstore-async/src/apis/pet_api.rs +++ b/samples/client/petstore/rust/reqwest/petstore-async/src/apis/pet_api.rs @@ -25,7 +25,7 @@ pub struct AddPetParams { #[derive(Clone, Debug, Default)] pub struct DeletePetParams { /// Pet id to delete - pub pet_id: i64, + pub petid: i64, pub api_key: Option } @@ -47,7 +47,7 @@ pub struct FindPetsByTagsParams { #[derive(Clone, Debug, Default)] pub struct GetPetByIdParams { /// ID of pet to return - pub pet_id: i64 + pub petid: i64 } /// struct for passing parameters to the method [`update_pet`] @@ -61,7 +61,7 @@ pub struct UpdatePetParams { #[derive(Clone, Debug, Default)] pub struct UpdatePetWithFormParams { /// ID of pet that needs to be updated - pub pet_id: i64, + pub petid: i64, /// Updated name of the pet pub name: Option, /// Updated status of the pet @@ -72,9 +72,9 @@ pub struct UpdatePetWithFormParams { #[derive(Clone, Debug, Default)] pub struct UploadFileParams { /// ID of pet to update - pub pet_id: i64, + pub petid: i64, /// Additional data to pass to server - pub additional_metadata: Option, + pub additionalmetadata: Option, /// file to upload pub file: Option } @@ -252,13 +252,13 @@ pub async fn delete_pet(configuration: &configuration::Configuration, params: De let local_var_configuration = configuration; // unbox the parameters - let pet_id = params.pet_id; + let petid = params.petid; let api_key = params.api_key; let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/pet/{petId}", local_var_configuration.base_path, petId=pet_id); + let local_var_uri_str = format!("{}/pet/{petId}", local_var_configuration.base_path, petId=petid); let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { @@ -375,12 +375,12 @@ pub async fn get_pet_by_id(configuration: &configuration::Configuration, params: let local_var_configuration = configuration; // unbox the parameters - let pet_id = params.pet_id; + let petid = params.petid; let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/pet/{petId}", local_var_configuration.base_path, petId=pet_id); + let local_var_uri_str = format!("{}/pet/{petId}", local_var_configuration.base_path, petId=petid); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { @@ -455,14 +455,14 @@ pub async fn update_pet_with_form(configuration: &configuration::Configuration, let local_var_configuration = configuration; // unbox the parameters - let pet_id = params.pet_id; + let petid = params.petid; let name = params.name; let status = params.status; let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/pet/{petId}", local_var_configuration.base_path, petId=pet_id); + let local_var_uri_str = format!("{}/pet/{petId}", local_var_configuration.base_path, petId=petid); let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { @@ -502,14 +502,14 @@ pub async fn upload_file(configuration: &configuration::Configuration, params: U let local_var_configuration = configuration; // unbox the parameters - let pet_id = params.pet_id; - let additional_metadata = params.additional_metadata; + let petid = params.petid; + let additionalmetadata = params.additionalmetadata; let file = params.file; let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/pet/{petId}/uploadImage", local_var_configuration.base_path, petId=pet_id); + let local_var_uri_str = format!("{}/pet/{petId}/uploadImage", local_var_configuration.base_path, petId=petid); let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { @@ -519,7 +519,7 @@ pub async fn upload_file(configuration: &configuration::Configuration, params: U local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); }; let mut local_var_form = reqwest::multipart::Form::new(); - if let Some(local_var_param_value) = additional_metadata { + if let Some(local_var_param_value) = additionalmetadata { local_var_form = local_var_form.text("additionalMetadata", local_var_param_value.to_string()); } // TODO: support file upload for 'file' parameter diff --git a/samples/client/petstore/rust/reqwest/petstore-async/src/apis/store_api.rs b/samples/client/petstore/rust/reqwest/petstore-async/src/apis/store_api.rs index 36d090f4f1a..40cc7617e9b 100644 --- a/samples/client/petstore/rust/reqwest/petstore-async/src/apis/store_api.rs +++ b/samples/client/petstore/rust/reqwest/petstore-async/src/apis/store_api.rs @@ -18,14 +18,14 @@ use super::{Error, configuration}; #[derive(Clone, Debug, Default)] pub struct DeleteOrderParams { /// ID of the order that needs to be deleted - pub order_id: String + pub orderid: String } /// struct for passing parameters to the method [`get_order_by_id`] #[derive(Clone, Debug, Default)] pub struct GetOrderByIdParams { /// ID of pet that needs to be fetched - pub order_id: i64 + pub orderid: i64 } /// struct for passing parameters to the method [`place_order`] @@ -106,12 +106,12 @@ pub async fn delete_order(configuration: &configuration::Configuration, params: let local_var_configuration = configuration; // unbox the parameters - let order_id = params.order_id; + let orderid = params.orderid; let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/store/order/{orderId}", local_var_configuration.base_path, orderId=crate::apis::urlencode(order_id)); + let local_var_uri_str = format!("{}/store/order/{orderId}", local_var_configuration.base_path, orderId=crate::apis::urlencode(orderid)); let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { @@ -181,12 +181,12 @@ pub async fn get_order_by_id(configuration: &configuration::Configuration, param let local_var_configuration = configuration; // unbox the parameters - let order_id = params.order_id; + let orderid = params.orderid; let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/store/order/{orderId}", local_var_configuration.base_path, orderId=order_id); + let local_var_uri_str = format!("{}/store/order/{orderId}", local_var_configuration.base_path, orderId=orderid); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { diff --git a/samples/client/petstore/rust/reqwest/petstore-awsv4signature/docs/PetApi.md b/samples/client/petstore/rust/reqwest/petstore-awsv4signature/docs/PetApi.md index 5adc9334151..3ac38fd18ae 100644 --- a/samples/client/petstore/rust/reqwest/petstore-awsv4signature/docs/PetApi.md +++ b/samples/client/petstore/rust/reqwest/petstore-awsv4signature/docs/PetApi.md @@ -47,7 +47,7 @@ Name | Type | Description | Required | Notes ## delete_pet -> delete_pet(pet_id, api_key) +> delete_pet(petid, api_key) Deletes a pet @@ -57,7 +57,7 @@ Deletes a pet Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**pet_id** | **i64** | Pet id to delete | [required] | +**petid** | **i64** | Pet id to delete | [required] | **api_key** | Option<**String**> | | | ### Return type @@ -138,7 +138,7 @@ Name | Type | Description | Required | Notes ## get_pet_by_id -> crate::models::Pet get_pet_by_id(pet_id) +> crate::models::Pet get_pet_by_id(petid) Find pet by ID Returns a single pet @@ -148,7 +148,7 @@ Returns a single pet Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**pet_id** | **i64** | ID of pet to return | [required] | +**petid** | **i64** | ID of pet to return | [required] | ### Return type @@ -198,7 +198,7 @@ Name | Type | Description | Required | Notes ## update_pet_with_form -> update_pet_with_form(pet_id, name, status) +> update_pet_with_form(petid, name, status) Updates a pet in the store with form data @@ -208,7 +208,7 @@ Updates a pet in the store with form data Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**pet_id** | **i64** | ID of pet that needs to be updated | [required] | +**petid** | **i64** | ID of pet that needs to be updated | [required] | **name** | Option<**String**> | Updated name of the pet | | **status** | Option<**String**> | Updated status of the pet | | @@ -230,7 +230,7 @@ Name | Type | Description | Required | Notes ## upload_file -> crate::models::ApiResponse upload_file(pet_id, additional_metadata, file) +> crate::models::ApiResponse upload_file(petid, additionalmetadata, file) uploads an image @@ -240,8 +240,8 @@ uploads an image Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**pet_id** | **i64** | ID of pet to update | [required] | -**additional_metadata** | Option<**String**> | Additional data to pass to server | | +**petid** | **i64** | ID of pet to update | [required] | +**additionalmetadata** | Option<**String**> | Additional data to pass to server | | **file** | Option<**std::path::PathBuf**> | file to upload | | ### Return type diff --git a/samples/client/petstore/rust/reqwest/petstore-awsv4signature/docs/StoreApi.md b/samples/client/petstore/rust/reqwest/petstore-awsv4signature/docs/StoreApi.md index a6b3c572ccc..364e7f93df6 100644 --- a/samples/client/petstore/rust/reqwest/petstore-awsv4signature/docs/StoreApi.md +++ b/samples/client/petstore/rust/reqwest/petstore-awsv4signature/docs/StoreApi.md @@ -13,7 +13,7 @@ Method | HTTP request | Description ## delete_order -> delete_order(order_id) +> delete_order(orderid) Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors @@ -23,7 +23,7 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or non Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**order_id** | **String** | ID of the order that needs to be deleted | [required] | +**orderid** | **String** | ID of the order that needs to be deleted | [required] | ### Return type @@ -70,7 +70,7 @@ This endpoint does not need any parameter. ## get_order_by_id -> crate::models::Order get_order_by_id(order_id) +> crate::models::Order get_order_by_id(orderid) Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions @@ -80,7 +80,7 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**order_id** | **i64** | ID of pet that needs to be fetched | [required] | +**orderid** | **i64** | ID of pet that needs to be fetched | [required] | ### Return type diff --git a/samples/client/petstore/rust/reqwest/petstore-awsv4signature/src/apis/pet_api.rs b/samples/client/petstore/rust/reqwest/petstore-awsv4signature/src/apis/pet_api.rs index 653fb343afc..0ffae238b20 100644 --- a/samples/client/petstore/rust/reqwest/petstore-awsv4signature/src/apis/pet_api.rs +++ b/samples/client/petstore/rust/reqwest/petstore-awsv4signature/src/apis/pet_api.rs @@ -128,12 +128,12 @@ pub fn add_pet(configuration: &configuration::Configuration, pet: crate::models: } /// -pub fn delete_pet(configuration: &configuration::Configuration, pet_id: i64, api_key: Option<&str>) -> Result<(), Error> { +pub fn delete_pet(configuration: &configuration::Configuration, petid: i64, api_key: Option<&str>) -> Result<(), Error> { let local_var_configuration = configuration; let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/pet/{petId}", local_var_configuration.base_path, petId=pet_id); + let local_var_uri_str = format!("{}/pet/{petId}", local_var_configuration.base_path, petId=petid); let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); if let Some(ref local_var_aws_v4_key) = local_var_configuration.aws_v4_key { @@ -271,12 +271,12 @@ pub fn find_pets_by_tags(configuration: &configuration::Configuration, tags: Vec } /// Returns a single pet -pub fn get_pet_by_id(configuration: &configuration::Configuration, pet_id: i64) -> Result> { +pub fn get_pet_by_id(configuration: &configuration::Configuration, petid: i64) -> Result> { let local_var_configuration = configuration; let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/pet/{petId}", local_var_configuration.base_path, petId=pet_id); + let local_var_uri_str = format!("{}/pet/{petId}", local_var_configuration.base_path, petId=petid); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); if let Some(ref local_var_aws_v4_key) = local_var_configuration.aws_v4_key { @@ -365,12 +365,12 @@ pub fn update_pet(configuration: &configuration::Configuration, pet: crate::mode } /// -pub fn update_pet_with_form(configuration: &configuration::Configuration, pet_id: i64, name: Option<&str>, status: Option<&str>) -> Result<(), Error> { +pub fn update_pet_with_form(configuration: &configuration::Configuration, petid: i64, name: Option<&str>, status: Option<&str>) -> Result<(), Error> { let local_var_configuration = configuration; let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/pet/{petId}", local_var_configuration.base_path, petId=pet_id); + let local_var_uri_str = format!("{}/pet/{petId}", local_var_configuration.base_path, petId=petid); let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); if let Some(ref local_var_aws_v4_key) = local_var_configuration.aws_v4_key { @@ -417,12 +417,12 @@ pub fn update_pet_with_form(configuration: &configuration::Configuration, pet_id } /// -pub fn upload_file(configuration: &configuration::Configuration, pet_id: i64, additional_metadata: Option<&str>, file: Option) -> Result> { +pub fn upload_file(configuration: &configuration::Configuration, petid: i64, additionalmetadata: Option<&str>, file: Option) -> Result> { let local_var_configuration = configuration; let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/pet/{petId}/uploadImage", local_var_configuration.base_path, petId=pet_id); + let local_var_uri_str = format!("{}/pet/{petId}/uploadImage", local_var_configuration.base_path, petId=petid); let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); if let Some(ref local_var_aws_v4_key) = local_var_configuration.aws_v4_key { @@ -445,7 +445,7 @@ pub fn upload_file(configuration: &configuration::Configuration, pet_id: i64, ad local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); }; let mut local_var_form = reqwest::multipart::Form::new(); - if let Some(local_var_param_value) = additional_metadata { + if let Some(local_var_param_value) = additionalmetadata { local_var_form = local_var_form.text("additionalMetadata", local_var_param_value.to_string()); } if let Some(local_var_param_value) = file { diff --git a/samples/client/petstore/rust/reqwest/petstore-awsv4signature/src/apis/store_api.rs b/samples/client/petstore/rust/reqwest/petstore-awsv4signature/src/apis/store_api.rs index d50a60e411b..df2c4e5cc7f 100644 --- a/samples/client/petstore/rust/reqwest/petstore-awsv4signature/src/apis/store_api.rs +++ b/samples/client/petstore/rust/reqwest/petstore-awsv4signature/src/apis/store_api.rs @@ -50,12 +50,12 @@ pub enum PlaceOrderError { /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors -pub fn delete_order(configuration: &configuration::Configuration, order_id: &str) -> Result<(), Error> { +pub fn delete_order(configuration: &configuration::Configuration, orderid: &str) -> Result<(), Error> { let local_var_configuration = configuration; let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/store/order/{orderId}", local_var_configuration.base_path, orderId=crate::apis::urlencode(order_id)); + let local_var_uri_str = format!("{}/store/order/{orderId}", local_var_configuration.base_path, orderId=crate::apis::urlencode(orderid)); let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { @@ -127,12 +127,12 @@ pub fn get_inventory(configuration: &configuration::Configuration, ) -> Result<: } /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions -pub fn get_order_by_id(configuration: &configuration::Configuration, order_id: i64) -> Result> { +pub fn get_order_by_id(configuration: &configuration::Configuration, orderid: i64) -> Result> { let local_var_configuration = configuration; let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/store/order/{orderId}", local_var_configuration.base_path, orderId=order_id); + let local_var_uri_str = format!("{}/store/order/{orderId}", local_var_configuration.base_path, orderId=orderid); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { diff --git a/samples/client/petstore/rust/reqwest/petstore/docs/PetApi.md b/samples/client/petstore/rust/reqwest/petstore/docs/PetApi.md index 5adc9334151..3ac38fd18ae 100644 --- a/samples/client/petstore/rust/reqwest/petstore/docs/PetApi.md +++ b/samples/client/petstore/rust/reqwest/petstore/docs/PetApi.md @@ -47,7 +47,7 @@ Name | Type | Description | Required | Notes ## delete_pet -> delete_pet(pet_id, api_key) +> delete_pet(petid, api_key) Deletes a pet @@ -57,7 +57,7 @@ Deletes a pet Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**pet_id** | **i64** | Pet id to delete | [required] | +**petid** | **i64** | Pet id to delete | [required] | **api_key** | Option<**String**> | | | ### Return type @@ -138,7 +138,7 @@ Name | Type | Description | Required | Notes ## get_pet_by_id -> crate::models::Pet get_pet_by_id(pet_id) +> crate::models::Pet get_pet_by_id(petid) Find pet by ID Returns a single pet @@ -148,7 +148,7 @@ Returns a single pet Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**pet_id** | **i64** | ID of pet to return | [required] | +**petid** | **i64** | ID of pet to return | [required] | ### Return type @@ -198,7 +198,7 @@ Name | Type | Description | Required | Notes ## update_pet_with_form -> update_pet_with_form(pet_id, name, status) +> update_pet_with_form(petid, name, status) Updates a pet in the store with form data @@ -208,7 +208,7 @@ Updates a pet in the store with form data Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**pet_id** | **i64** | ID of pet that needs to be updated | [required] | +**petid** | **i64** | ID of pet that needs to be updated | [required] | **name** | Option<**String**> | Updated name of the pet | | **status** | Option<**String**> | Updated status of the pet | | @@ -230,7 +230,7 @@ Name | Type | Description | Required | Notes ## upload_file -> crate::models::ApiResponse upload_file(pet_id, additional_metadata, file) +> crate::models::ApiResponse upload_file(petid, additionalmetadata, file) uploads an image @@ -240,8 +240,8 @@ uploads an image Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**pet_id** | **i64** | ID of pet to update | [required] | -**additional_metadata** | Option<**String**> | Additional data to pass to server | | +**petid** | **i64** | ID of pet to update | [required] | +**additionalmetadata** | Option<**String**> | Additional data to pass to server | | **file** | Option<**std::path::PathBuf**> | file to upload | | ### Return type diff --git a/samples/client/petstore/rust/reqwest/petstore/docs/StoreApi.md b/samples/client/petstore/rust/reqwest/petstore/docs/StoreApi.md index a6b3c572ccc..364e7f93df6 100644 --- a/samples/client/petstore/rust/reqwest/petstore/docs/StoreApi.md +++ b/samples/client/petstore/rust/reqwest/petstore/docs/StoreApi.md @@ -13,7 +13,7 @@ Method | HTTP request | Description ## delete_order -> delete_order(order_id) +> delete_order(orderid) Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors @@ -23,7 +23,7 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or non Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**order_id** | **String** | ID of the order that needs to be deleted | [required] | +**orderid** | **String** | ID of the order that needs to be deleted | [required] | ### Return type @@ -70,7 +70,7 @@ This endpoint does not need any parameter. ## get_order_by_id -> crate::models::Order get_order_by_id(order_id) +> crate::models::Order get_order_by_id(orderid) Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions @@ -80,7 +80,7 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**order_id** | **i64** | ID of pet that needs to be fetched | [required] | +**orderid** | **i64** | ID of pet that needs to be fetched | [required] | ### Return type diff --git a/samples/client/petstore/rust/reqwest/petstore/src/apis/pet_api.rs b/samples/client/petstore/rust/reqwest/petstore/src/apis/pet_api.rs index f44a38d6095..88cba2e99d2 100644 --- a/samples/client/petstore/rust/reqwest/petstore/src/apis/pet_api.rs +++ b/samples/client/petstore/rust/reqwest/petstore/src/apis/pet_api.rs @@ -115,12 +115,12 @@ pub fn add_pet(configuration: &configuration::Configuration, pet: crate::models: } /// -pub fn delete_pet(configuration: &configuration::Configuration, pet_id: i64, api_key: Option<&str>) -> Result<(), Error> { +pub fn delete_pet(configuration: &configuration::Configuration, petid: i64, api_key: Option<&str>) -> Result<(), Error> { let local_var_configuration = configuration; let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/pet/{petId}", local_var_configuration.base_path, petId=pet_id); + let local_var_uri_str = format!("{}/pet/{petId}", local_var_configuration.base_path, petId=petid); let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { @@ -219,12 +219,12 @@ pub fn find_pets_by_tags(configuration: &configuration::Configuration, tags: Vec } /// Returns a single pet -pub fn get_pet_by_id(configuration: &configuration::Configuration, pet_id: i64) -> Result> { +pub fn get_pet_by_id(configuration: &configuration::Configuration, petid: i64) -> Result> { let local_var_configuration = configuration; let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/pet/{petId}", local_var_configuration.base_path, petId=pet_id); + let local_var_uri_str = format!("{}/pet/{petId}", local_var_configuration.base_path, petId=petid); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { @@ -287,12 +287,12 @@ pub fn update_pet(configuration: &configuration::Configuration, pet: crate::mode } /// -pub fn update_pet_with_form(configuration: &configuration::Configuration, pet_id: i64, name: Option<&str>, status: Option<&str>) -> Result<(), Error> { +pub fn update_pet_with_form(configuration: &configuration::Configuration, petid: i64, name: Option<&str>, status: Option<&str>) -> Result<(), Error> { let local_var_configuration = configuration; let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/pet/{petId}", local_var_configuration.base_path, petId=pet_id); + let local_var_uri_str = format!("{}/pet/{petId}", local_var_configuration.base_path, petId=petid); let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { @@ -326,12 +326,12 @@ pub fn update_pet_with_form(configuration: &configuration::Configuration, pet_id } /// -pub fn upload_file(configuration: &configuration::Configuration, pet_id: i64, additional_metadata: Option<&str>, file: Option) -> Result> { +pub fn upload_file(configuration: &configuration::Configuration, petid: i64, additionalmetadata: Option<&str>, file: Option) -> Result> { let local_var_configuration = configuration; let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/pet/{petId}/uploadImage", local_var_configuration.base_path, petId=pet_id); + let local_var_uri_str = format!("{}/pet/{petId}/uploadImage", local_var_configuration.base_path, petId=petid); let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { @@ -341,7 +341,7 @@ pub fn upload_file(configuration: &configuration::Configuration, pet_id: i64, ad local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); }; let mut local_var_form = reqwest::multipart::Form::new(); - if let Some(local_var_param_value) = additional_metadata { + if let Some(local_var_param_value) = additionalmetadata { local_var_form = local_var_form.text("additionalMetadata", local_var_param_value.to_string()); } if let Some(local_var_param_value) = file { diff --git a/samples/client/petstore/rust/reqwest/petstore/src/apis/store_api.rs b/samples/client/petstore/rust/reqwest/petstore/src/apis/store_api.rs index f142404c3f2..bcc69cc560d 100644 --- a/samples/client/petstore/rust/reqwest/petstore/src/apis/store_api.rs +++ b/samples/client/petstore/rust/reqwest/petstore/src/apis/store_api.rs @@ -50,12 +50,12 @@ pub enum PlaceOrderError { /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors -pub fn delete_order(configuration: &configuration::Configuration, order_id: &str) -> Result<(), Error> { +pub fn delete_order(configuration: &configuration::Configuration, orderid: &str) -> Result<(), Error> { let local_var_configuration = configuration; let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/store/order/{orderId}", local_var_configuration.base_path, orderId=crate::apis::urlencode(order_id)); + let local_var_uri_str = format!("{}/store/order/{orderId}", local_var_configuration.base_path, orderId=crate::apis::urlencode(orderid)); let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { @@ -114,12 +114,12 @@ pub fn get_inventory(configuration: &configuration::Configuration, ) -> Result<: } /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions -pub fn get_order_by_id(configuration: &configuration::Configuration, order_id: i64) -> Result> { +pub fn get_order_by_id(configuration: &configuration::Configuration, orderid: i64) -> Result> { let local_var_configuration = configuration; let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/store/order/{orderId}", local_var_configuration.base_path, orderId=order_id); + let local_var_uri_str = format!("{}/store/order/{orderId}", local_var_configuration.base_path, orderId=orderid); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {