diff --git a/modules/openapi-generator/src/main/resources/rust-axum/apis.mustache b/modules/openapi-generator/src/main/resources/rust-axum/apis.mustache index 2a6f11f009de..1ed9600ac311 100644 --- a/modules/openapi-generator/src/main/resources/rust-axum/apis.mustache +++ b/modules/openapi-generator/src/main/resources/rust-axum/apis.mustache @@ -16,73 +16,7 @@ use crate::{models, types::*}; {{#operations}} -{{#basicAuthorization}} -/// {{classnamePascalCase}} APIs - Authorization. -#[async_trait] -#[allow(clippy::ptr_arg)] -pub trait {{classnamePascalCase}}Authorization { - type Claims; - -{{#operation}} - {{#vendorExtensions}} - {{#x-has-auth-methods}} - {{#basicAuthorization}} - {{#vendorExtensions}} - /// Authorization{{#summary}} - {{{.}}}{{/summary}}. - /// {{{operationId}}} - {{{httpMethod}}} {{{basePathWithoutHost}}}{{{path}}} - async fn {{{x-operation-id}}}_authorize( - &self, - method: &Method, - host: &Host, - cookies: &CookieJar, - claims: &Self::Claims, - {{#headerParams.size}} - header_params: &models::{{{operationIdCamelCase}}}HeaderParams, - {{/headerParams.size}} - {{#pathParams.size}} - path_params: &models::{{{operationIdCamelCase}}}PathParams, - {{/pathParams.size}} - {{#queryParams.size}} - query_params: &models::{{{operationIdCamelCase}}}QueryParams, - {{/queryParams.size}} - {{^x-consumes-multipart-related}} - {{^x-consumes-multipart}} - {{#bodyParam}} - {{#vendorExtensions}} - {{^x-consumes-plain-text}} - body: &{{^required}}Option<{{/required}}{{{dataType}}}{{^required}}>{{/required}}, - {{/x-consumes-plain-text}} - {{#x-consumes-plain-text}} - {{#isString}} - body: &String, - {{/isString}} - {{^isString}} - body: &Bytes, - {{/isString}} - {{/x-consumes-plain-text}} - {{/vendorExtensions}} - {{/bodyParam}} - {{/x-consumes-multipart}} - {{/x-consumes-multipart-related}} - {{#x-consumes-multipart}} - body: &Multipart, - {{/x-consumes-multipart}} - {{#x-consumes-multipart-related}} - body: &axum::body::Body, - {{/x-consumes-multipart-related}} - ) -> Result { - Ok(super::Authorization::Authorized) - } - {{/vendorExtensions}} - {{/basicAuthorization}} - {{/x-has-auth-methods}} - {{/vendorExtensions}} - {{^-last}} - - {{/-last}} -{{/operation}} -} -{{/basicAuthorization}} +{{>authorization}} /// {{classnamePascalCase}} #[async_trait] diff --git a/modules/openapi-generator/src/main/resources/rust-axum/authorization.mustache b/modules/openapi-generator/src/main/resources/rust-axum/authorization.mustache new file mode 100644 index 000000000000..3ebff12cffc9 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/rust-axum/authorization.mustache @@ -0,0 +1,67 @@ +{{#basicAuthorization}} +/// {{classnamePascalCase}} APIs - Authorization. +#[async_trait] +#[allow(clippy::ptr_arg)] +pub trait {{classnamePascalCase}}Authorization { + type Claims; + +{{#operation}} + {{#vendorExtensions}} + {{#x-has-auth-methods}} + {{#basicAuthorization}} + {{#vendorExtensions}} + /// Authorization{{#summary}} - {{{.}}}{{/summary}}. + /// {{{operationId}}} - {{{httpMethod}}} {{{basePathWithoutHost}}}{{{path}}} + async fn {{{x-operation-id}}}_authorize( + &self, + method: &Method, + host: &Host, + cookies: &CookieJar, + claims: &Self::Claims, + {{#headerParams.size}} + header_params: &models::{{{operationIdCamelCase}}}HeaderParams, + {{/headerParams.size}} + {{#pathParams.size}} + path_params: &models::{{{operationIdCamelCase}}}PathParams, + {{/pathParams.size}} + {{#queryParams.size}} + query_params: &models::{{{operationIdCamelCase}}}QueryParams, + {{/queryParams.size}} + {{^x-consumes-multipart-related}} + {{^x-consumes-multipart}} + {{#bodyParam}} + {{#vendorExtensions}} + {{^x-consumes-plain-text}} + body: &{{^required}}Option<{{/required}}{{{dataType}}}{{^required}}>{{/required}}, + {{/x-consumes-plain-text}} + {{#x-consumes-plain-text}} + {{#isString}} + body: &String, + {{/isString}} + {{^isString}} + body: &Bytes, + {{/isString}} + {{/x-consumes-plain-text}} + {{/vendorExtensions}} + {{/bodyParam}} + {{/x-consumes-multipart}} + {{/x-consumes-multipart-related}} + {{#x-consumes-multipart}} + body: &Multipart, + {{/x-consumes-multipart}} + {{#x-consumes-multipart-related}} + body: &axum::body::Body, + {{/x-consumes-multipart-related}} + ) -> Result { + Ok(super::Authorization::Authorized) + } + {{/vendorExtensions}} + {{/basicAuthorization}} + {{/x-has-auth-methods}} + {{/vendorExtensions}} + {{^-last}} + + {{/-last}} +{{/operation}} +} +{{/basicAuthorization}} \ No newline at end of file diff --git a/samples/server/petstore/rust-axum/output/apikey-authorization/.openapi-generator/VERSION b/samples/server/petstore/rust-axum/output/apikey-authorization/.openapi-generator/VERSION index fc74d6ceba8e..5e5282953086 100644 --- a/samples/server/petstore/rust-axum/output/apikey-authorization/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-axum/output/apikey-authorization/.openapi-generator/VERSION @@ -1 +1 @@ -7.15.0-SNAPSHOT +7.16.0-SNAPSHOT diff --git a/samples/server/petstore/rust-axum/output/apikey-authorization/README.md b/samples/server/petstore/rust-axum/output/apikey-authorization/README.md index 7891b626bafb..6acf6afe159e 100644 --- a/samples/server/petstore/rust-axum/output/apikey-authorization/README.md +++ b/samples/server/petstore/rust-axum/output/apikey-authorization/README.md @@ -12,7 +12,7 @@ server, you can easily generate a server stub. To see how to make this your own, look here: [README]((https://openapi-generator.tech)) - API version: 1.0.0 -- Generator version: 7.15.0-SNAPSHOT +- Generator version: 7.16.0-SNAPSHOT diff --git a/samples/server/petstore/rust-axum/output/apikey-authorization/src/models.rs b/samples/server/petstore/rust-axum/output/apikey-authorization/src/models.rs index 356f5bccce00..b20237912cd0 100644 --- a/samples/server/petstore/rust-axum/output/apikey-authorization/src/models.rs +++ b/samples/server/petstore/rust-axum/output/apikey-authorization/src/models.rs @@ -135,7 +135,7 @@ impl std::str::FromStr for Amount { None => { return std::result::Result::Err( "Missing value while parsing Amount".to_string(), - ) + ); } }; @@ -153,7 +153,7 @@ impl std::str::FromStr for Amount { _ => { return std::result::Result::Err( "Unexpected key while parsing Amount".to_string(), - ) + ); } } } @@ -288,7 +288,7 @@ impl std::str::FromStr for CheckoutError { None => { return std::result::Result::Err( "Missing value while parsing CheckoutError".to_string(), - ) + ); } }; @@ -306,7 +306,7 @@ impl std::str::FromStr for CheckoutError { _ => { return std::result::Result::Err( "Unexpected key while parsing CheckoutError".to_string(), - ) + ); } } } @@ -474,7 +474,7 @@ impl std::str::FromStr for Payment { None => { return std::result::Result::Err( "Missing value while parsing Payment".to_string(), - ) + ); } }; @@ -506,7 +506,7 @@ impl std::str::FromStr for Payment { _ => { return std::result::Result::Err( "Unexpected key while parsing Payment".to_string(), - ) + ); } } } @@ -656,7 +656,7 @@ impl std::str::FromStr for PaymentMethod { None => { return std::result::Result::Err( "Missing value while parsing PaymentMethod".to_string(), - ) + ); } }; @@ -674,7 +674,7 @@ impl std::str::FromStr for PaymentMethod { _ => { return std::result::Result::Err( "Unexpected key while parsing PaymentMethod".to_string(), - ) + ); } } } @@ -805,7 +805,7 @@ impl std::str::FromStr for PaymentResult { None => { return std::result::Result::Err( "Missing value while parsing PaymentResult".to_string(), - ) + ); } }; @@ -823,7 +823,7 @@ impl std::str::FromStr for PaymentResult { _ => { return std::result::Result::Err( "Unexpected key while parsing PaymentResult".to_string(), - ) + ); } } } diff --git a/samples/server/petstore/rust-axum/output/apikey-authorization/src/server/mod.rs b/samples/server/petstore/rust-axum/output/apikey-authorization/src/server/mod.rs index 2ddf51af68c1..876aee9a3abb 100644 --- a/samples/server/petstore/rust-axum/output/apikey-authorization/src/server/mod.rs +++ b/samples/server/petstore/rust-axum/output/apikey-authorization/src/server/mod.rs @@ -3,7 +3,7 @@ use std::collections::HashMap; use axum::{body::Body, extract::*, response::Response, routing::*}; use axum_extra::extract::{CookieJar, Host, Query as QueryExtra}; use bytes::Bytes; -use http::{header::CONTENT_TYPE, HeaderMap, HeaderName, HeaderValue, Method, StatusCode}; +use http::{HeaderMap, HeaderName, HeaderValue, Method, StatusCode, header::CONTENT_TYPE}; use tracing::error; use validator::{Validate, ValidationErrors}; diff --git a/samples/server/petstore/rust-axum/output/apikey-authorization/src/types.rs b/samples/server/petstore/rust-axum/output/apikey-authorization/src/types.rs index a20401ceb704..d99febd86d5e 100644 --- a/samples/server/petstore/rust-axum/output/apikey-authorization/src/types.rs +++ b/samples/server/petstore/rust-axum/output/apikey-authorization/src/types.rs @@ -1,6 +1,6 @@ use std::{mem, str::FromStr}; -use base64::{engine::general_purpose, Engine}; +use base64::{Engine, engine::general_purpose}; use serde::{Deserialize, Deserializer, Serialize, Serializer}; #[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] diff --git a/samples/server/petstore/rust-axum/output/apikey-auths/.openapi-generator/VERSION b/samples/server/petstore/rust-axum/output/apikey-auths/.openapi-generator/VERSION index fc74d6ceba8e..5e5282953086 100644 --- a/samples/server/petstore/rust-axum/output/apikey-auths/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-axum/output/apikey-auths/.openapi-generator/VERSION @@ -1 +1 @@ -7.15.0-SNAPSHOT +7.16.0-SNAPSHOT diff --git a/samples/server/petstore/rust-axum/output/apikey-auths/README.md b/samples/server/petstore/rust-axum/output/apikey-auths/README.md index 16979debcbdf..373495c2e18b 100644 --- a/samples/server/petstore/rust-axum/output/apikey-auths/README.md +++ b/samples/server/petstore/rust-axum/output/apikey-auths/README.md @@ -12,7 +12,7 @@ server, you can easily generate a server stub. To see how to make this your own, look here: [README]((https://openapi-generator.tech)) - API version: 1.0.0 -- Generator version: 7.15.0-SNAPSHOT +- Generator version: 7.16.0-SNAPSHOT diff --git a/samples/server/petstore/rust-axum/output/apikey-auths/src/models.rs b/samples/server/petstore/rust-axum/output/apikey-auths/src/models.rs index 356f5bccce00..b20237912cd0 100644 --- a/samples/server/petstore/rust-axum/output/apikey-auths/src/models.rs +++ b/samples/server/petstore/rust-axum/output/apikey-auths/src/models.rs @@ -135,7 +135,7 @@ impl std::str::FromStr for Amount { None => { return std::result::Result::Err( "Missing value while parsing Amount".to_string(), - ) + ); } }; @@ -153,7 +153,7 @@ impl std::str::FromStr for Amount { _ => { return std::result::Result::Err( "Unexpected key while parsing Amount".to_string(), - ) + ); } } } @@ -288,7 +288,7 @@ impl std::str::FromStr for CheckoutError { None => { return std::result::Result::Err( "Missing value while parsing CheckoutError".to_string(), - ) + ); } }; @@ -306,7 +306,7 @@ impl std::str::FromStr for CheckoutError { _ => { return std::result::Result::Err( "Unexpected key while parsing CheckoutError".to_string(), - ) + ); } } } @@ -474,7 +474,7 @@ impl std::str::FromStr for Payment { None => { return std::result::Result::Err( "Missing value while parsing Payment".to_string(), - ) + ); } }; @@ -506,7 +506,7 @@ impl std::str::FromStr for Payment { _ => { return std::result::Result::Err( "Unexpected key while parsing Payment".to_string(), - ) + ); } } } @@ -656,7 +656,7 @@ impl std::str::FromStr for PaymentMethod { None => { return std::result::Result::Err( "Missing value while parsing PaymentMethod".to_string(), - ) + ); } }; @@ -674,7 +674,7 @@ impl std::str::FromStr for PaymentMethod { _ => { return std::result::Result::Err( "Unexpected key while parsing PaymentMethod".to_string(), - ) + ); } } } @@ -805,7 +805,7 @@ impl std::str::FromStr for PaymentResult { None => { return std::result::Result::Err( "Missing value while parsing PaymentResult".to_string(), - ) + ); } }; @@ -823,7 +823,7 @@ impl std::str::FromStr for PaymentResult { _ => { return std::result::Result::Err( "Unexpected key while parsing PaymentResult".to_string(), - ) + ); } } } diff --git a/samples/server/petstore/rust-axum/output/apikey-auths/src/server/mod.rs b/samples/server/petstore/rust-axum/output/apikey-auths/src/server/mod.rs index 7b22799d030a..45b533b4450b 100644 --- a/samples/server/petstore/rust-axum/output/apikey-auths/src/server/mod.rs +++ b/samples/server/petstore/rust-axum/output/apikey-auths/src/server/mod.rs @@ -3,7 +3,7 @@ use std::collections::HashMap; use axum::{body::Body, extract::*, response::Response, routing::*}; use axum_extra::extract::{CookieJar, Host, Query as QueryExtra}; use bytes::Bytes; -use http::{header::CONTENT_TYPE, HeaderMap, HeaderName, HeaderValue, Method, StatusCode}; +use http::{HeaderMap, HeaderName, HeaderValue, Method, StatusCode, header::CONTENT_TYPE}; use tracing::error; use validator::{Validate, ValidationErrors}; diff --git a/samples/server/petstore/rust-axum/output/apikey-auths/src/types.rs b/samples/server/petstore/rust-axum/output/apikey-auths/src/types.rs index 2b5504414374..fd55b5e9a0f7 100644 --- a/samples/server/petstore/rust-axum/output/apikey-auths/src/types.rs +++ b/samples/server/petstore/rust-axum/output/apikey-auths/src/types.rs @@ -1,6 +1,6 @@ use std::{mem, str::FromStr}; -use base64::{engine::general_purpose, Engine}; +use base64::{Engine, engine::general_purpose}; use serde::{Deserialize, Deserializer, Serialize, Serializer}; #[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] diff --git a/samples/server/petstore/rust-axum/output/multipart-v3/.openapi-generator/VERSION b/samples/server/petstore/rust-axum/output/multipart-v3/.openapi-generator/VERSION index fc74d6ceba8e..5e5282953086 100644 --- a/samples/server/petstore/rust-axum/output/multipart-v3/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-axum/output/multipart-v3/.openapi-generator/VERSION @@ -1 +1 @@ -7.15.0-SNAPSHOT +7.16.0-SNAPSHOT diff --git a/samples/server/petstore/rust-axum/output/multipart-v3/README.md b/samples/server/petstore/rust-axum/output/multipart-v3/README.md index 2481a15e8804..25fcd41615d4 100644 --- a/samples/server/petstore/rust-axum/output/multipart-v3/README.md +++ b/samples/server/petstore/rust-axum/output/multipart-v3/README.md @@ -12,7 +12,7 @@ server, you can easily generate a server stub. To see how to make this your own, look here: [README]((https://openapi-generator.tech)) - API version: 1.0.7 -- Generator version: 7.15.0-SNAPSHOT +- Generator version: 7.16.0-SNAPSHOT diff --git a/samples/server/petstore/rust-axum/output/multipart-v3/src/models.rs b/samples/server/petstore/rust-axum/output/multipart-v3/src/models.rs index be65a54e3828..7b10d2066db3 100644 --- a/samples/server/petstore/rust-axum/output/multipart-v3/src/models.rs +++ b/samples/server/petstore/rust-axum/output/multipart-v3/src/models.rs @@ -140,7 +140,7 @@ impl std::str::FromStr for MultipartRelatedRequest { None => { return std::result::Result::Err( "Missing value while parsing MultipartRelatedRequest".to_string(), - ) + ); } }; @@ -309,7 +309,7 @@ impl std::str::FromStr for MultipartRequest { None => { return std::result::Result::Err( "Missing value while parsing MultipartRequest".to_string(), - ) + ); } }; @@ -336,7 +336,7 @@ impl std::str::FromStr for MultipartRequest { _ => { return std::result::Result::Err( "Unexpected key while parsing MultipartRequest".to_string(), - ) + ); } } } @@ -484,7 +484,7 @@ impl std::str::FromStr for MultipartRequestObjectField { None => { return std::result::Result::Err( "Missing value while parsing MultipartRequestObjectField".to_string(), - ) + ); } }; @@ -628,7 +628,7 @@ impl std::str::FromStr for MultipleIdenticalMimeTypesPostRequest { return std::result::Result::Err( "Missing value while parsing MultipleIdenticalMimeTypesPostRequest" .to_string(), - ) + ); } }; diff --git a/samples/server/petstore/rust-axum/output/multipart-v3/src/server/mod.rs b/samples/server/petstore/rust-axum/output/multipart-v3/src/server/mod.rs index cf0b6039f2a5..c052383f748e 100644 --- a/samples/server/petstore/rust-axum/output/multipart-v3/src/server/mod.rs +++ b/samples/server/petstore/rust-axum/output/multipart-v3/src/server/mod.rs @@ -3,7 +3,7 @@ use std::collections::HashMap; use axum::{body::Body, extract::*, response::Response, routing::*}; use axum_extra::extract::{CookieJar, Host, Query as QueryExtra}; use bytes::Bytes; -use http::{header::CONTENT_TYPE, HeaderMap, HeaderName, HeaderValue, Method, StatusCode}; +use http::{HeaderMap, HeaderName, HeaderValue, Method, StatusCode, header::CONTENT_TYPE}; use tracing::error; use validator::{Validate, ValidationErrors}; diff --git a/samples/server/petstore/rust-axum/output/multipart-v3/src/types.rs b/samples/server/petstore/rust-axum/output/multipart-v3/src/types.rs index 286e650eeb0c..63ebd9d68333 100644 --- a/samples/server/petstore/rust-axum/output/multipart-v3/src/types.rs +++ b/samples/server/petstore/rust-axum/output/multipart-v3/src/types.rs @@ -1,6 +1,6 @@ use std::{mem, str::FromStr}; -use base64::{engine::general_purpose, Engine}; +use base64::{Engine, engine::general_purpose}; use serde::{Deserialize, Deserializer, Serialize, Serializer}; #[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] diff --git a/samples/server/petstore/rust-axum/output/openapi-v3/.openapi-generator/VERSION b/samples/server/petstore/rust-axum/output/openapi-v3/.openapi-generator/VERSION index fc74d6ceba8e..5e5282953086 100644 --- a/samples/server/petstore/rust-axum/output/openapi-v3/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-axum/output/openapi-v3/.openapi-generator/VERSION @@ -1 +1 @@ -7.15.0-SNAPSHOT +7.16.0-SNAPSHOT diff --git a/samples/server/petstore/rust-axum/output/openapi-v3/README.md b/samples/server/petstore/rust-axum/output/openapi-v3/README.md index 538dc2574b5b..d01db91f0244 100644 --- a/samples/server/petstore/rust-axum/output/openapi-v3/README.md +++ b/samples/server/petstore/rust-axum/output/openapi-v3/README.md @@ -12,7 +12,7 @@ server, you can easily generate a server stub. To see how to make this your own, look here: [README]((https://openapi-generator.tech)) - API version: 1.0.7 -- Generator version: 7.15.0-SNAPSHOT +- Generator version: 7.16.0-SNAPSHOT diff --git a/samples/server/petstore/rust-axum/output/openapi-v3/src/models.rs b/samples/server/petstore/rust-axum/output/openapi-v3/src/models.rs index 2f8bced20eb9..4d2fb31b5ab6 100644 --- a/samples/server/petstore/rust-axum/output/openapi-v3/src/models.rs +++ b/samples/server/petstore/rust-axum/output/openapi-v3/src/models.rs @@ -226,7 +226,9 @@ impl ::std::str::FromStr for AdditionalPropertiesReferencedAnyOfObject { type Err = &'static str; fn from_str(s: &str) -> std::result::Result { - std::result::Result::Err("Parsing additionalProperties for AdditionalPropertiesReferencedAnyOfObject is not supported") + std::result::Result::Err( + "Parsing additionalProperties for AdditionalPropertiesReferencedAnyOfObject is not supported", + ) } } @@ -370,7 +372,7 @@ impl std::str::FromStr for AdditionalPropertiesWithNullable { None => { return std::result::Result::Err( "Missing value while parsing AdditionalPropertiesWithNullable".to_string(), - ) + ); } }; @@ -654,10 +656,10 @@ impl AnotherXmlObject { /// Should be implemented in a serde serializer impl std::fmt::Display for AnotherXmlObject { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - let params: Vec> = vec![self - .inner_string - .as_ref() - .map(|inner_string| ["inner_string".to_string(), inner_string.to_string()].join(","))]; + let params: Vec> = + vec![self.inner_string.as_ref().map(|inner_string| { + ["inner_string".to_string(), inner_string.to_string()].join(",") + })]; write!( f, @@ -693,7 +695,7 @@ impl std::str::FromStr for AnotherXmlObject { None => { return std::result::Result::Err( "Missing value while parsing AnotherXmlObject".to_string(), - ) + ); } }; @@ -707,7 +709,7 @@ impl std::str::FromStr for AnotherXmlObject { _ => { return std::result::Result::Err( "Unexpected key while parsing AnotherXmlObject".to_string(), - ) + ); } } } @@ -924,7 +926,7 @@ impl std::str::FromStr for AnyOfProperty { None => { return std::result::Result::Err( "Missing value while parsing AnyOfProperty".to_string(), - ) + ); } }; @@ -944,7 +946,7 @@ impl std::str::FromStr for AnyOfProperty { _ => { return std::result::Result::Err( "Unexpected key while parsing AnyOfProperty".to_string(), - ) + ); } } } @@ -1078,7 +1080,7 @@ impl std::str::FromStr for DuplicateXmlObject { None => { return std::result::Result::Err( "Missing value while parsing DuplicateXmlObject".to_string(), - ) + ); } }; @@ -1097,7 +1099,7 @@ impl std::str::FromStr for DuplicateXmlObject { _ => { return std::result::Result::Err( "Unexpected key while parsing DuplicateXmlObject".to_string(), - ) + ); } } } @@ -1374,7 +1376,7 @@ impl std::str::FromStr for FormTestRequest { None => { return std::result::Result::Err( "Missing value while parsing FormTestRequest".to_string(), - ) + ); } }; @@ -1385,12 +1387,12 @@ impl std::str::FromStr for FormTestRequest { return std::result::Result::Err( "Parsing a container in this style is not supported in FormTestRequest" .to_string(), - ) + ); } _ => { return std::result::Result::Err( "Unexpected key while parsing FormTestRequest".to_string(), - ) + ); } } } @@ -1498,10 +1500,11 @@ impl MultigetGet201Response { /// Should be implemented in a serde serializer impl std::fmt::Display for MultigetGet201Response { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - let params: Vec> = vec![self - .foo - .as_ref() - .map(|foo| ["foo".to_string(), foo.to_string()].join(","))]; + let params: Vec> = vec![ + self.foo + .as_ref() + .map(|foo| ["foo".to_string(), foo.to_string()].join(",")), + ]; write!( f, @@ -1537,7 +1540,7 @@ impl std::str::FromStr for MultigetGet201Response { None => { return std::result::Result::Err( "Missing value while parsing MultigetGet201Response".to_string(), - ) + ); } }; @@ -1551,7 +1554,7 @@ impl std::str::FromStr for MultigetGet201Response { _ => { return std::result::Result::Err( "Unexpected key while parsing MultigetGet201Response".to_string(), - ) + ); } } } @@ -2028,7 +2031,7 @@ impl std::str::FromStr for NullableTest { None => { return std::result::Result::Err( "Missing value while parsing NullableTest".to_string(), - ) + ); } }; @@ -2055,30 +2058,30 @@ impl std::str::FromStr for NullableTest { return std::result::Result::Err( "Parsing a container in this style is not supported in NullableTest" .to_string(), - ) + ); } "min_item_test" => { return std::result::Result::Err( "Parsing a container in this style is not supported in NullableTest" .to_string(), - ) + ); } "max_item_test" => { return std::result::Result::Err( "Parsing a container in this style is not supported in NullableTest" .to_string(), - ) + ); } "min_max_item_test" => { return std::result::Result::Err( "Parsing a container in this style is not supported in NullableTest" .to_string(), - ) + ); } _ => { return std::result::Result::Err( "Unexpected key while parsing NullableTest".to_string(), - ) + ); } } } @@ -2228,7 +2231,7 @@ impl std::str::FromStr for ObjectHeader { None => { return std::result::Result::Err( "Missing value while parsing ObjectHeader".to_string(), - ) + ); } }; @@ -2246,7 +2249,7 @@ impl std::str::FromStr for ObjectHeader { _ => { return std::result::Result::Err( "Unexpected key while parsing ObjectHeader".to_string(), - ) + ); } } } @@ -2378,7 +2381,7 @@ impl std::str::FromStr for ObjectParam { None => { return std::result::Result::Err( "Missing value while parsing ObjectParam".to_string(), - ) + ); } }; @@ -2396,7 +2399,7 @@ impl std::str::FromStr for ObjectParam { _ => { return std::result::Result::Err( "Unexpected key while parsing ObjectParam".to_string(), - ) + ); } } } @@ -2545,7 +2548,7 @@ impl std::str::FromStr for ObjectUntypedProps { None => { return std::result::Result::Err( "Missing value while parsing ObjectUntypedProps".to_string(), - ) + ); } }; @@ -2695,7 +2698,7 @@ impl std::str::FromStr for ObjectWithArrayOfObjects { None => { return std::result::Result::Err( "Missing value while parsing ObjectWithArrayOfObjects".to_string(), - ) + ); } }; @@ -3358,7 +3361,7 @@ impl std::str::FromStr for XmlObject { None => { return std::result::Result::Err( "Missing value while parsing XmlObject".to_string(), - ) + ); } }; @@ -3376,7 +3379,7 @@ impl std::str::FromStr for XmlObject { _ => { return std::result::Result::Err( "Unexpected key while parsing XmlObject".to_string(), - ) + ); } } } diff --git a/samples/server/petstore/rust-axum/output/openapi-v3/src/server/mod.rs b/samples/server/petstore/rust-axum/output/openapi-v3/src/server/mod.rs index b153a34993d0..dc11ffb48867 100644 --- a/samples/server/petstore/rust-axum/output/openapi-v3/src/server/mod.rs +++ b/samples/server/petstore/rust-axum/output/openapi-v3/src/server/mod.rs @@ -3,7 +3,7 @@ use std::collections::HashMap; use axum::{body::Body, extract::*, response::Response, routing::*}; use axum_extra::extract::{CookieJar, Host, Query as QueryExtra}; use bytes::Bytes; -use http::{header::CONTENT_TYPE, HeaderMap, HeaderName, HeaderValue, Method, StatusCode}; +use http::{HeaderMap, HeaderName, HeaderValue, Method, StatusCode, header::CONTENT_TYPE}; use tracing::error; use validator::{Validate, ValidationErrors}; diff --git a/samples/server/petstore/rust-axum/output/openapi-v3/src/types.rs b/samples/server/petstore/rust-axum/output/openapi-v3/src/types.rs index 31a0e8c40420..c2331f6d31da 100644 --- a/samples/server/petstore/rust-axum/output/openapi-v3/src/types.rs +++ b/samples/server/petstore/rust-axum/output/openapi-v3/src/types.rs @@ -1,6 +1,6 @@ use std::{mem, str::FromStr}; -use base64::{engine::general_purpose, Engine}; +use base64::{Engine, engine::general_purpose}; use serde::{Deserialize, Deserializer, Serialize, Serializer}; #[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] diff --git a/samples/server/petstore/rust-axum/output/ops-v3/.openapi-generator/VERSION b/samples/server/petstore/rust-axum/output/ops-v3/.openapi-generator/VERSION index fc74d6ceba8e..5e5282953086 100644 --- a/samples/server/petstore/rust-axum/output/ops-v3/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-axum/output/ops-v3/.openapi-generator/VERSION @@ -1 +1 @@ -7.15.0-SNAPSHOT +7.16.0-SNAPSHOT diff --git a/samples/server/petstore/rust-axum/output/ops-v3/README.md b/samples/server/petstore/rust-axum/output/ops-v3/README.md index 42a0575c8fd8..79bbb55e5b98 100644 --- a/samples/server/petstore/rust-axum/output/ops-v3/README.md +++ b/samples/server/petstore/rust-axum/output/ops-v3/README.md @@ -12,7 +12,7 @@ server, you can easily generate a server stub. To see how to make this your own, look here: [README]((https://openapi-generator.tech)) - API version: 0.0.1 -- Generator version: 7.15.0-SNAPSHOT +- Generator version: 7.16.0-SNAPSHOT diff --git a/samples/server/petstore/rust-axum/output/ops-v3/src/server/mod.rs b/samples/server/petstore/rust-axum/output/ops-v3/src/server/mod.rs index 1d34bd604b52..fb006693d67f 100644 --- a/samples/server/petstore/rust-axum/output/ops-v3/src/server/mod.rs +++ b/samples/server/petstore/rust-axum/output/ops-v3/src/server/mod.rs @@ -3,7 +3,7 @@ use std::collections::HashMap; use axum::{body::Body, extract::*, response::Response, routing::*}; use axum_extra::extract::{CookieJar, Host, Query as QueryExtra}; use bytes::Bytes; -use http::{header::CONTENT_TYPE, HeaderMap, HeaderName, HeaderValue, Method, StatusCode}; +use http::{HeaderMap, HeaderName, HeaderValue, Method, StatusCode, header::CONTENT_TYPE}; use tracing::error; use validator::{Validate, ValidationErrors}; diff --git a/samples/server/petstore/rust-axum/output/ops-v3/src/types.rs b/samples/server/petstore/rust-axum/output/ops-v3/src/types.rs index 9de8a80ffc7d..fcab6ba59ec4 100644 --- a/samples/server/petstore/rust-axum/output/ops-v3/src/types.rs +++ b/samples/server/petstore/rust-axum/output/ops-v3/src/types.rs @@ -1,6 +1,6 @@ use std::{mem, str::FromStr}; -use base64::{engine::general_purpose, Engine}; +use base64::{Engine, engine::general_purpose}; use serde::{Deserialize, Deserializer, Serialize, Serializer}; #[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] diff --git a/samples/server/petstore/rust-axum/output/petstore-with-fake-endpoints-models-for-testing/.openapi-generator/VERSION b/samples/server/petstore/rust-axum/output/petstore-with-fake-endpoints-models-for-testing/.openapi-generator/VERSION index fc74d6ceba8e..5e5282953086 100644 --- a/samples/server/petstore/rust-axum/output/petstore-with-fake-endpoints-models-for-testing/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-axum/output/petstore-with-fake-endpoints-models-for-testing/.openapi-generator/VERSION @@ -1 +1 @@ -7.15.0-SNAPSHOT +7.16.0-SNAPSHOT diff --git a/samples/server/petstore/rust-axum/output/petstore-with-fake-endpoints-models-for-testing/README.md b/samples/server/petstore/rust-axum/output/petstore-with-fake-endpoints-models-for-testing/README.md index 5a8333854fb6..e23826c249ce 100644 --- a/samples/server/petstore/rust-axum/output/petstore-with-fake-endpoints-models-for-testing/README.md +++ b/samples/server/petstore/rust-axum/output/petstore-with-fake-endpoints-models-for-testing/README.md @@ -12,7 +12,7 @@ server, you can easily generate a server stub. To see how to make this your own, look here: [README]((https://openapi-generator.tech)) - API version: 1.0.0 -- Generator version: 7.15.0-SNAPSHOT +- Generator version: 7.16.0-SNAPSHOT diff --git a/samples/server/petstore/rust-axum/output/petstore-with-fake-endpoints-models-for-testing/src/models.rs b/samples/server/petstore/rust-axum/output/petstore-with-fake-endpoints-models-for-testing/src/models.rs index 2f4422bcaede..69f5dda3e2ee 100644 --- a/samples/server/petstore/rust-axum/output/petstore-with-fake-endpoints-models-for-testing/src/models.rs +++ b/samples/server/petstore/rust-axum/output/petstore-with-fake-endpoints-models-for-testing/src/models.rs @@ -279,7 +279,7 @@ impl std::str::FromStr for AdditionalPropertiesClass { None => { return std::result::Result::Err( "Missing value while parsing AdditionalPropertiesClass".to_string(), - ) + ); } }; @@ -417,7 +417,7 @@ impl std::str::FromStr for Animal { None => { return std::result::Result::Err( "Missing value while parsing Animal".to_string(), - ) + ); } }; @@ -435,7 +435,7 @@ impl std::str::FromStr for Animal { _ => { return std::result::Result::Err( "Unexpected key while parsing Animal".to_string(), - ) + ); } } } @@ -721,7 +721,7 @@ impl std::str::FromStr for ApiResponse { None => { return std::result::Result::Err( "Missing value while parsing ApiResponse".to_string(), - ) + ); } }; @@ -743,7 +743,7 @@ impl std::str::FromStr for ApiResponse { _ => { return std::result::Result::Err( "Unexpected key while parsing ApiResponse".to_string(), - ) + ); } } } @@ -864,7 +864,7 @@ impl std::str::FromStr for ArrayOfArrayOfNumberOnly { None => { return std::result::Result::Err( "Missing value while parsing ArrayOfArrayOfNumberOnly".to_string(), - ) + ); } }; @@ -995,7 +995,7 @@ impl std::str::FromStr for ArrayOfNumberOnly { None => { return std::result::Result::Err( "Missing value while parsing ArrayOfNumberOnly".to_string(), - ) + ); } }; @@ -1009,7 +1009,7 @@ impl std::str::FromStr for ArrayOfNumberOnly { _ => { return std::result::Result::Err( "Unexpected key while parsing ArrayOfNumberOnly".to_string(), - ) + ); } } } @@ -1172,7 +1172,7 @@ impl std::str::FromStr for ArrayTest { None => { return std::result::Result::Err( "Missing value while parsing ArrayTest".to_string(), - ) + ); } }; @@ -1183,30 +1183,30 @@ impl std::str::FromStr for ArrayTest { return std::result::Result::Err( "Parsing a container in this style is not supported in ArrayTest" .to_string(), - ) + ); } "array_array_of_integer" => { return std::result::Result::Err( "Parsing a container in this style is not supported in ArrayTest" .to_string(), - ) + ); } "array_array_of_model" => { return std::result::Result::Err( "Parsing a container in this style is not supported in ArrayTest" .to_string(), - ) + ); } "array_of_enum" => { return std::result::Result::Err( "Parsing a container in this style is not supported in ArrayTest" .to_string(), - ) + ); } _ => { return std::result::Result::Err( "Unexpected key while parsing ArrayTest".to_string(), - ) + ); } } } @@ -1387,7 +1387,7 @@ impl std::str::FromStr for Capitalization { None => { return std::result::Result::Err( "Missing value while parsing Capitalization".to_string(), - ) + ); } }; @@ -1421,7 +1421,7 @@ impl std::str::FromStr for Capitalization { _ => { return std::result::Result::Err( "Unexpected key while parsing Capitalization".to_string(), - ) + ); } } } @@ -1562,7 +1562,7 @@ impl std::str::FromStr for Cat { let val = match string_iter.next() { Some(x) => x, None => { - return std::result::Result::Err("Missing value while parsing Cat".to_string()) + return std::result::Result::Err("Missing value while parsing Cat".to_string()); } }; @@ -1584,7 +1584,7 @@ impl std::str::FromStr for Cat { _ => { return std::result::Result::Err( "Unexpected key while parsing Cat".to_string(), - ) + ); } } } @@ -1716,7 +1716,7 @@ impl std::str::FromStr for Category { None => { return std::result::Result::Err( "Missing value while parsing Category".to_string(), - ) + ); } }; @@ -1734,7 +1734,7 @@ impl std::str::FromStr for Category { _ => { return std::result::Result::Err( "Unexpected key while parsing Category".to_string(), - ) + ); } } } @@ -1815,10 +1815,11 @@ impl ClassModel { /// Should be implemented in a serde serializer impl std::fmt::Display for ClassModel { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - let params: Vec> = vec![self - ._class - .as_ref() - .map(|_class| ["_class".to_string(), _class.to_string()].join(","))]; + let params: Vec> = vec![ + self._class + .as_ref() + .map(|_class| ["_class".to_string(), _class.to_string()].join(",")), + ]; write!( f, @@ -1854,7 +1855,7 @@ impl std::str::FromStr for ClassModel { None => { return std::result::Result::Err( "Missing value while parsing ClassModel".to_string(), - ) + ); } }; @@ -1868,7 +1869,7 @@ impl std::str::FromStr for ClassModel { _ => { return std::result::Result::Err( "Unexpected key while parsing ClassModel".to_string(), - ) + ); } } } @@ -1947,10 +1948,11 @@ impl Client { /// Should be implemented in a serde serializer impl std::fmt::Display for Client { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - let params: Vec> = vec![self - .client - .as_ref() - .map(|client| ["client".to_string(), client.to_string()].join(","))]; + let params: Vec> = vec![ + self.client + .as_ref() + .map(|client| ["client".to_string(), client.to_string()].join(",")), + ]; write!( f, @@ -1986,7 +1988,7 @@ impl std::str::FromStr for Client { None => { return std::result::Result::Err( "Missing value while parsing Client".to_string(), - ) + ); } }; @@ -2000,7 +2002,7 @@ impl std::str::FromStr for Client { _ => { return std::result::Result::Err( "Unexpected key while parsing Client".to_string(), - ) + ); } } } @@ -2137,7 +2139,7 @@ impl std::str::FromStr for Dog { let val = match string_iter.next() { Some(x) => x, None => { - return std::result::Result::Err("Missing value while parsing Dog".to_string()) + return std::result::Result::Err("Missing value while parsing Dog".to_string()); } }; @@ -2159,7 +2161,7 @@ impl std::str::FromStr for Dog { _ => { return std::result::Result::Err( "Unexpected key while parsing Dog".to_string(), - ) + ); } } } @@ -2241,19 +2243,20 @@ impl DollarSpecialLeftSquareBracketModelNameRightSquareBracket { /// Should be implemented in a serde serializer impl std::fmt::Display for DollarSpecialLeftSquareBracketModelNameRightSquareBracket { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - let params: Vec> = vec![self - .dollar_special_left_square_bracket_property_name_right_square_bracket - .as_ref() - .map( - |dollar_special_left_square_bracket_property_name_right_square_bracket| { - [ - "$special[property.name]".to_string(), - dollar_special_left_square_bracket_property_name_right_square_bracket - .to_string(), - ] - .join(",") - }, - )]; + let params: Vec> = vec![ + self.dollar_special_left_square_bracket_property_name_right_square_bracket + .as_ref() + .map( + |dollar_special_left_square_bracket_property_name_right_square_bracket| { + [ + "$special[property.name]".to_string(), + dollar_special_left_square_bracket_property_name_right_square_bracket + .to_string(), + ] + .join(",") + }, + ), + ]; write!( f, @@ -2447,7 +2450,7 @@ impl std::str::FromStr for EnumArrays { None => { return std::result::Result::Err( "Missing value while parsing EnumArrays".to_string(), - ) + ); } }; @@ -2462,18 +2465,18 @@ impl std::str::FromStr for EnumArrays { return std::result::Result::Err( "Parsing a container in this style is not supported in EnumArrays" .to_string(), - ) + ); } "array_array_enum" => { return std::result::Result::Err( "Parsing a container in this style is not supported in EnumArrays" .to_string(), - ) + ); } _ => { return std::result::Result::Err( "Unexpected key while parsing EnumArrays".to_string(), - ) + ); } } } @@ -2681,7 +2684,7 @@ impl std::str::FromStr for EnumTest { None => { return std::result::Result::Err( "Missing value while parsing EnumTest".to_string(), - ) + ); } }; @@ -2712,7 +2715,7 @@ impl std::str::FromStr for EnumTest { _ => { return std::result::Result::Err( "Unexpected key while parsing EnumTest".to_string(), - ) + ); } } } @@ -2969,7 +2972,7 @@ impl std::str::FromStr for FormatTest { None => { return std::result::Result::Err( "Missing value while parsing FormatTest".to_string(), - ) + ); } }; @@ -3008,13 +3011,13 @@ impl std::str::FromStr for FormatTest { return std::result::Result::Err( "Parsing binary data in this style is not supported in FormatTest" .to_string(), - ) + ); } "binary" => { return std::result::Result::Err( "Parsing binary data in this style is not supported in FormatTest" .to_string(), - ) + ); } #[allow(clippy::redundant_clone)] "date" => intermediate_rep.date.push( @@ -3038,7 +3041,7 @@ impl std::str::FromStr for FormatTest { _ => { return std::result::Result::Err( "Unexpected key while parsing FormatTest".to_string(), - ) + ); } } } @@ -3197,7 +3200,7 @@ impl std::str::FromStr for HasOnlyReadOnly { None => { return std::result::Result::Err( "Missing value while parsing HasOnlyReadOnly".to_string(), - ) + ); } }; @@ -3215,7 +3218,7 @@ impl std::str::FromStr for HasOnlyReadOnly { _ => { return std::result::Result::Err( "Unexpected key while parsing HasOnlyReadOnly".to_string(), - ) + ); } } } @@ -3297,10 +3300,10 @@ impl List { /// Should be implemented in a serde serializer impl std::fmt::Display for List { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - let params: Vec> = vec![self - .param_123_list - .as_ref() - .map(|param_123_list| ["123-list".to_string(), param_123_list.to_string()].join(","))]; + let params: Vec> = + vec![self.param_123_list.as_ref().map(|param_123_list| { + ["123-list".to_string(), param_123_list.to_string()].join(",") + })]; write!( f, @@ -3334,7 +3337,7 @@ impl std::str::FromStr for List { let val = match string_iter.next() { Some(x) => x, None => { - return std::result::Result::Err("Missing value while parsing List".to_string()) + return std::result::Result::Err("Missing value while parsing List".to_string()); } }; @@ -3348,7 +3351,7 @@ impl std::str::FromStr for List { _ => { return std::result::Result::Err( "Unexpected key while parsing List".to_string(), - ) + ); } } } @@ -3492,7 +3495,7 @@ impl std::str::FromStr for MapTest { None => { return std::result::Result::Err( "Missing value while parsing MapTest".to_string(), - ) + ); } }; @@ -3503,24 +3506,24 @@ impl std::str::FromStr for MapTest { return std::result::Result::Err( "Parsing a container in this style is not supported in MapTest" .to_string(), - ) + ); } "map_map_of_enum" => { return std::result::Result::Err( "Parsing a container in this style is not supported in MapTest" .to_string(), - ) + ); } "map_of_enum_string" => { return std::result::Result::Err( "Parsing a container in this style is not supported in MapTest" .to_string(), - ) + ); } _ => { return std::result::Result::Err( "Unexpected key while parsing MapTest".to_string(), - ) + ); } } } @@ -3809,7 +3812,7 @@ impl std::str::FromStr for Model200Response { None => { return std::result::Result::Err( "Missing value while parsing Model200Response".to_string(), - ) + ); } }; @@ -3827,7 +3830,7 @@ impl std::str::FromStr for Model200Response { _ => { return std::result::Result::Err( "Unexpected key while parsing Model200Response".to_string(), - ) + ); } } } @@ -3973,7 +3976,7 @@ impl std::str::FromStr for Name { let val = match string_iter.next() { Some(x) => x, None => { - return std::result::Result::Err("Missing value while parsing Name".to_string()) + return std::result::Result::Err("Missing value while parsing Name".to_string()); } }; @@ -3999,7 +4002,7 @@ impl std::str::FromStr for Name { _ => { return std::result::Result::Err( "Unexpected key while parsing Name".to_string(), - ) + ); } } } @@ -4082,10 +4085,11 @@ impl NumberOnly { /// Should be implemented in a serde serializer impl std::fmt::Display for NumberOnly { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - let params: Vec> = vec![self - .just_number - .as_ref() - .map(|just_number| ["JustNumber".to_string(), just_number.to_string()].join(","))]; + let params: Vec> = vec![ + self.just_number + .as_ref() + .map(|just_number| ["JustNumber".to_string(), just_number.to_string()].join(",")), + ]; write!( f, @@ -4121,7 +4125,7 @@ impl std::str::FromStr for NumberOnly { None => { return std::result::Result::Err( "Missing value while parsing NumberOnly".to_string(), - ) + ); } }; @@ -4135,7 +4139,7 @@ impl std::str::FromStr for NumberOnly { _ => { return std::result::Result::Err( "Unexpected key while parsing NumberOnly".to_string(), - ) + ); } } } @@ -4485,7 +4489,7 @@ impl std::str::FromStr for Order { None => { return std::result::Result::Err( "Missing value while parsing Order".to_string(), - ) + ); } }; @@ -4520,7 +4524,7 @@ impl std::str::FromStr for Order { _ => { return std::result::Result::Err( "Unexpected key while parsing Order".to_string(), - ) + ); } } } @@ -4697,7 +4701,7 @@ impl std::str::FromStr for OuterComposite { None => { return std::result::Result::Err( "Missing value while parsing OuterComposite".to_string(), - ) + ); } }; @@ -4719,7 +4723,7 @@ impl std::str::FromStr for OuterComposite { _ => { return std::result::Result::Err( "Unexpected key while parsing OuterComposite".to_string(), - ) + ); } } } @@ -5019,7 +5023,7 @@ impl std::str::FromStr for Pet { let val = match string_iter.next() { Some(x) => x, None => { - return std::result::Result::Err("Missing value while parsing Pet".to_string()) + return std::result::Result::Err("Missing value while parsing Pet".to_string()); } }; @@ -5042,12 +5046,12 @@ impl std::str::FromStr for Pet { "photoUrls" => { return std::result::Result::Err( "Parsing a container in this style is not supported in Pet".to_string(), - ) + ); } "tags" => { return std::result::Result::Err( "Parsing a container in this style is not supported in Pet".to_string(), - ) + ); } #[allow(clippy::redundant_clone)] "status" => intermediate_rep.status.push( @@ -5056,7 +5060,7 @@ impl std::str::FromStr for Pet { _ => { return std::result::Result::Err( "Unexpected key while parsing Pet".to_string(), - ) + ); } } } @@ -5196,7 +5200,7 @@ impl std::str::FromStr for ReadOnlyFirst { None => { return std::result::Result::Err( "Missing value while parsing ReadOnlyFirst".to_string(), - ) + ); } }; @@ -5214,7 +5218,7 @@ impl std::str::FromStr for ReadOnlyFirst { _ => { return std::result::Result::Err( "Unexpected key while parsing ReadOnlyFirst".to_string(), - ) + ); } } } @@ -5294,10 +5298,11 @@ impl Return { /// Should be implemented in a serde serializer impl std::fmt::Display for Return { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - let params: Vec> = vec![self - .r#return - .as_ref() - .map(|r#return| ["return".to_string(), r#return.to_string()].join(","))]; + let params: Vec> = vec![ + self.r#return + .as_ref() + .map(|r#return| ["return".to_string(), r#return.to_string()].join(",")), + ]; write!( f, @@ -5333,7 +5338,7 @@ impl std::str::FromStr for Return { None => { return std::result::Result::Err( "Missing value while parsing Return".to_string(), - ) + ); } }; @@ -5347,7 +5352,7 @@ impl std::str::FromStr for Return { _ => { return std::result::Result::Err( "Unexpected key while parsing Return".to_string(), - ) + ); } } } @@ -5475,7 +5480,7 @@ impl std::str::FromStr for Tag { let val = match string_iter.next() { Some(x) => x, None => { - return std::result::Result::Err("Missing value while parsing Tag".to_string()) + return std::result::Result::Err("Missing value while parsing Tag".to_string()); } }; @@ -5493,7 +5498,7 @@ impl std::str::FromStr for Tag { _ => { return std::result::Result::Err( "Unexpected key while parsing Tag".to_string(), - ) + ); } } } @@ -5758,7 +5763,7 @@ impl std::str::FromStr for TestEndpointParametersRequest { None => { return std::result::Result::Err( "Missing value while parsing TestEndpointParametersRequest".to_string(), - ) + ); } }; @@ -5943,7 +5948,7 @@ impl std::str::FromStr for TestEnumParametersRequest { None => { return std::result::Result::Err( "Missing value while parsing TestEnumParametersRequest".to_string(), - ) + ); } }; @@ -5957,7 +5962,7 @@ impl std::str::FromStr for TestEnumParametersRequest { _ => { return std::result::Result::Err( "Unexpected key while parsing TestEnumParametersRequest".to_string(), - ) + ); } } } @@ -6083,7 +6088,7 @@ impl std::str::FromStr for TestJsonFormDataRequest { None => { return std::result::Result::Err( "Missing value while parsing TestJsonFormDataRequest".to_string(), - ) + ); } }; @@ -6101,7 +6106,7 @@ impl std::str::FromStr for TestJsonFormDataRequest { _ => { return std::result::Result::Err( "Unexpected key while parsing TestJsonFormDataRequest".to_string(), - ) + ); } } } @@ -6243,7 +6248,7 @@ impl std::str::FromStr for UpdatePetWithFormRequest { None => { return std::result::Result::Err( "Missing value while parsing UpdatePetWithFormRequest".to_string(), - ) + ); } }; @@ -6261,7 +6266,7 @@ impl std::str::FromStr for UpdatePetWithFormRequest { _ => { return std::result::Result::Err( "Unexpected key while parsing UpdatePetWithFormRequest".to_string(), - ) + ); } } } @@ -6399,7 +6404,7 @@ impl std::str::FromStr for UploadFileRequest { None => { return std::result::Result::Err( "Missing value while parsing UploadFileRequest".to_string(), - ) + ); } }; @@ -6417,7 +6422,7 @@ impl std::str::FromStr for UploadFileRequest { _ => { return std::result::Result::Err( "Unexpected key while parsing UploadFileRequest".to_string(), - ) + ); } } } @@ -6606,7 +6611,7 @@ impl std::str::FromStr for User { let val = match string_iter.next() { Some(x) => x, None => { - return std::result::Result::Err("Missing value while parsing User".to_string()) + return std::result::Result::Err("Missing value while parsing User".to_string()); } }; @@ -6648,7 +6653,7 @@ impl std::str::FromStr for User { _ => { return std::result::Result::Err( "Unexpected key while parsing User".to_string(), - ) + ); } } } diff --git a/samples/server/petstore/rust-axum/output/petstore-with-fake-endpoints-models-for-testing/src/server/mod.rs b/samples/server/petstore/rust-axum/output/petstore-with-fake-endpoints-models-for-testing/src/server/mod.rs index a535849f7959..18ac8a328821 100644 --- a/samples/server/petstore/rust-axum/output/petstore-with-fake-endpoints-models-for-testing/src/server/mod.rs +++ b/samples/server/petstore/rust-axum/output/petstore-with-fake-endpoints-models-for-testing/src/server/mod.rs @@ -3,7 +3,7 @@ use std::collections::HashMap; use axum::{body::Body, extract::*, response::Response, routing::*}; use axum_extra::extract::{CookieJar, Host, Query as QueryExtra}; use bytes::Bytes; -use http::{header::CONTENT_TYPE, HeaderMap, HeaderName, HeaderValue, Method, StatusCode}; +use http::{HeaderMap, HeaderName, HeaderValue, Method, StatusCode, header::CONTENT_TYPE}; use tracing::error; use validator::{Validate, ValidationErrors}; diff --git a/samples/server/petstore/rust-axum/output/petstore-with-fake-endpoints-models-for-testing/src/types.rs b/samples/server/petstore/rust-axum/output/petstore-with-fake-endpoints-models-for-testing/src/types.rs index 5a390a3f5a21..c5d649a86291 100644 --- a/samples/server/petstore/rust-axum/output/petstore-with-fake-endpoints-models-for-testing/src/types.rs +++ b/samples/server/petstore/rust-axum/output/petstore-with-fake-endpoints-models-for-testing/src/types.rs @@ -1,6 +1,6 @@ use std::{mem, str::FromStr}; -use base64::{engine::general_purpose, Engine}; +use base64::{Engine, engine::general_purpose}; use serde::{Deserialize, Deserializer, Serialize, Serializer}; #[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] diff --git a/samples/server/petstore/rust-axum/output/petstore/.openapi-generator/VERSION b/samples/server/petstore/rust-axum/output/petstore/.openapi-generator/VERSION index fc74d6ceba8e..5e5282953086 100644 --- a/samples/server/petstore/rust-axum/output/petstore/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-axum/output/petstore/.openapi-generator/VERSION @@ -1 +1 @@ -7.15.0-SNAPSHOT +7.16.0-SNAPSHOT diff --git a/samples/server/petstore/rust-axum/output/petstore/README.md b/samples/server/petstore/rust-axum/output/petstore/README.md index d471b2d9ac13..cc6bd02a32bf 100644 --- a/samples/server/petstore/rust-axum/output/petstore/README.md +++ b/samples/server/petstore/rust-axum/output/petstore/README.md @@ -12,7 +12,7 @@ server, you can easily generate a server stub. To see how to make this your own, look here: [README]((https://openapi-generator.tech)) - API version: 1.0.0 -- Generator version: 7.15.0-SNAPSHOT +- Generator version: 7.16.0-SNAPSHOT diff --git a/samples/server/petstore/rust-axum/output/petstore/src/models.rs b/samples/server/petstore/rust-axum/output/petstore/src/models.rs index 011a9f76196e..107ff2617b50 100644 --- a/samples/server/petstore/rust-axum/output/petstore/src/models.rs +++ b/samples/server/petstore/rust-axum/output/petstore/src/models.rs @@ -249,7 +249,7 @@ impl std::str::FromStr for ApiResponse { None => { return std::result::Result::Err( "Missing value while parsing ApiResponse".to_string(), - ) + ); } }; @@ -271,7 +271,7 @@ impl std::str::FromStr for ApiResponse { _ => { return std::result::Result::Err( "Unexpected key while parsing ApiResponse".to_string(), - ) + ); } } } @@ -411,7 +411,7 @@ impl std::str::FromStr for Category { None => { return std::result::Result::Err( "Missing value while parsing Category".to_string(), - ) + ); } }; @@ -429,7 +429,7 @@ impl std::str::FromStr for Category { _ => { return std::result::Result::Err( "Unexpected key while parsing Category".to_string(), - ) + ); } } } @@ -597,7 +597,7 @@ impl std::str::FromStr for Order { None => { return std::result::Result::Err( "Missing value while parsing Order".to_string(), - ) + ); } }; @@ -632,7 +632,7 @@ impl std::str::FromStr for Order { _ => { return std::result::Result::Err( "Unexpected key while parsing Order".to_string(), - ) + ); } } } @@ -804,7 +804,7 @@ impl std::str::FromStr for Pet { let val = match string_iter.next() { Some(x) => x, None => { - return std::result::Result::Err("Missing value while parsing Pet".to_string()) + return std::result::Result::Err("Missing value while parsing Pet".to_string()); } }; @@ -827,12 +827,12 @@ impl std::str::FromStr for Pet { "photoUrls" => { return std::result::Result::Err( "Parsing a container in this style is not supported in Pet".to_string(), - ) + ); } "tags" => { return std::result::Result::Err( "Parsing a container in this style is not supported in Pet".to_string(), - ) + ); } #[allow(clippy::redundant_clone)] "status" => intermediate_rep.status.push( @@ -841,7 +841,7 @@ impl std::str::FromStr for Pet { _ => { return std::result::Result::Err( "Unexpected key while parsing Pet".to_string(), - ) + ); } } } @@ -979,7 +979,7 @@ impl std::str::FromStr for Tag { let val = match string_iter.next() { Some(x) => x, None => { - return std::result::Result::Err("Missing value while parsing Tag".to_string()) + return std::result::Result::Err("Missing value while parsing Tag".to_string()); } }; @@ -997,7 +997,7 @@ impl std::str::FromStr for Tag { _ => { return std::result::Result::Err( "Unexpected key while parsing Tag".to_string(), - ) + ); } } } @@ -1127,7 +1127,7 @@ impl std::str::FromStr for UpdatePetWithFormRequest { None => { return std::result::Result::Err( "Missing value while parsing UpdatePetWithFormRequest".to_string(), - ) + ); } }; @@ -1145,7 +1145,7 @@ impl std::str::FromStr for UpdatePetWithFormRequest { _ => { return std::result::Result::Err( "Unexpected key while parsing UpdatePetWithFormRequest".to_string(), - ) + ); } } } @@ -1283,7 +1283,7 @@ impl std::str::FromStr for UploadFileRequest { None => { return std::result::Result::Err( "Missing value while parsing UploadFileRequest".to_string(), - ) + ); } }; @@ -1301,7 +1301,7 @@ impl std::str::FromStr for UploadFileRequest { _ => { return std::result::Result::Err( "Unexpected key while parsing UploadFileRequest".to_string(), - ) + ); } } } @@ -1491,7 +1491,7 @@ impl std::str::FromStr for User { let val = match string_iter.next() { Some(x) => x, None => { - return std::result::Result::Err("Missing value while parsing User".to_string()) + return std::result::Result::Err("Missing value while parsing User".to_string()); } }; @@ -1533,7 +1533,7 @@ impl std::str::FromStr for User { _ => { return std::result::Result::Err( "Unexpected key while parsing User".to_string(), - ) + ); } } } diff --git a/samples/server/petstore/rust-axum/output/petstore/src/server/mod.rs b/samples/server/petstore/rust-axum/output/petstore/src/server/mod.rs index 51d67ea7439c..cd65b69be6a1 100644 --- a/samples/server/petstore/rust-axum/output/petstore/src/server/mod.rs +++ b/samples/server/petstore/rust-axum/output/petstore/src/server/mod.rs @@ -3,7 +3,7 @@ use std::collections::HashMap; use axum::{body::Body, extract::*, response::Response, routing::*}; use axum_extra::extract::{CookieJar, Host, Query as QueryExtra}; use bytes::Bytes; -use http::{header::CONTENT_TYPE, HeaderMap, HeaderName, HeaderValue, Method, StatusCode}; +use http::{HeaderMap, HeaderName, HeaderValue, Method, StatusCode, header::CONTENT_TYPE}; use tracing::error; use validator::{Validate, ValidationErrors}; diff --git a/samples/server/petstore/rust-axum/output/petstore/src/types.rs b/samples/server/petstore/rust-axum/output/petstore/src/types.rs index 79a6ee8f7602..149d3613ea9c 100644 --- a/samples/server/petstore/rust-axum/output/petstore/src/types.rs +++ b/samples/server/petstore/rust-axum/output/petstore/src/types.rs @@ -1,6 +1,6 @@ use std::{mem, str::FromStr}; -use base64::{engine::general_purpose, Engine}; +use base64::{Engine, engine::general_purpose}; use serde::{Deserialize, Deserializer, Serialize, Serializer}; #[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] diff --git a/samples/server/petstore/rust-axum/output/ping-bearer-auth/.openapi-generator/VERSION b/samples/server/petstore/rust-axum/output/ping-bearer-auth/.openapi-generator/VERSION index fc74d6ceba8e..5e5282953086 100644 --- a/samples/server/petstore/rust-axum/output/ping-bearer-auth/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-axum/output/ping-bearer-auth/.openapi-generator/VERSION @@ -1 +1 @@ -7.15.0-SNAPSHOT +7.16.0-SNAPSHOT diff --git a/samples/server/petstore/rust-axum/output/ping-bearer-auth/README.md b/samples/server/petstore/rust-axum/output/ping-bearer-auth/README.md index 2dd7acca656a..c713cda26bc5 100644 --- a/samples/server/petstore/rust-axum/output/ping-bearer-auth/README.md +++ b/samples/server/petstore/rust-axum/output/ping-bearer-auth/README.md @@ -12,7 +12,7 @@ server, you can easily generate a server stub. To see how to make this your own, look here: [README]((https://openapi-generator.tech)) - API version: 1.0 -- Generator version: 7.15.0-SNAPSHOT +- Generator version: 7.16.0-SNAPSHOT diff --git a/samples/server/petstore/rust-axum/output/ping-bearer-auth/src/server/mod.rs b/samples/server/petstore/rust-axum/output/ping-bearer-auth/src/server/mod.rs index 33dc17183ec2..164176b0f409 100644 --- a/samples/server/petstore/rust-axum/output/ping-bearer-auth/src/server/mod.rs +++ b/samples/server/petstore/rust-axum/output/ping-bearer-auth/src/server/mod.rs @@ -3,7 +3,7 @@ use std::collections::HashMap; use axum::{body::Body, extract::*, response::Response, routing::*}; use axum_extra::extract::{CookieJar, Host, Query as QueryExtra}; use bytes::Bytes; -use http::{header::CONTENT_TYPE, HeaderMap, HeaderName, HeaderValue, Method, StatusCode}; +use http::{HeaderMap, HeaderName, HeaderValue, Method, StatusCode, header::CONTENT_TYPE}; use tracing::error; use validator::{Validate, ValidationErrors}; diff --git a/samples/server/petstore/rust-axum/output/ping-bearer-auth/src/types.rs b/samples/server/petstore/rust-axum/output/ping-bearer-auth/src/types.rs index 122ef30ee034..8b410453316b 100644 --- a/samples/server/petstore/rust-axum/output/ping-bearer-auth/src/types.rs +++ b/samples/server/petstore/rust-axum/output/ping-bearer-auth/src/types.rs @@ -1,6 +1,6 @@ use std::{mem, str::FromStr}; -use base64::{engine::general_purpose, Engine}; +use base64::{Engine, engine::general_purpose}; use serde::{Deserialize, Deserializer, Serialize, Serializer}; #[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] diff --git a/samples/server/petstore/rust-axum/output/rust-axum-array-params-test/.openapi-generator/VERSION b/samples/server/petstore/rust-axum/output/rust-axum-array-params-test/.openapi-generator/VERSION index fc74d6ceba8e..5e5282953086 100644 --- a/samples/server/petstore/rust-axum/output/rust-axum-array-params-test/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-axum/output/rust-axum-array-params-test/.openapi-generator/VERSION @@ -1 +1 @@ -7.15.0-SNAPSHOT +7.16.0-SNAPSHOT diff --git a/samples/server/petstore/rust-axum/output/rust-axum-array-params-test/README.md b/samples/server/petstore/rust-axum/output/rust-axum-array-params-test/README.md index bc32cdffe9b9..b1daa56d2986 100644 --- a/samples/server/petstore/rust-axum/output/rust-axum-array-params-test/README.md +++ b/samples/server/petstore/rust-axum/output/rust-axum-array-params-test/README.md @@ -12,7 +12,7 @@ server, you can easily generate a server stub. To see how to make this your own, look here: [README]((https://openapi-generator.tech)) - API version: 0.0.1 -- Generator version: 7.15.0-SNAPSHOT +- Generator version: 7.16.0-SNAPSHOT diff --git a/samples/server/petstore/rust-axum/output/rust-axum-array-params-test/src/server/mod.rs b/samples/server/petstore/rust-axum/output/rust-axum-array-params-test/src/server/mod.rs index ebe374d0f463..529c8e0a5fce 100644 --- a/samples/server/petstore/rust-axum/output/rust-axum-array-params-test/src/server/mod.rs +++ b/samples/server/petstore/rust-axum/output/rust-axum-array-params-test/src/server/mod.rs @@ -3,7 +3,7 @@ use std::collections::HashMap; use axum::{body::Body, extract::*, response::Response, routing::*}; use axum_extra::extract::{CookieJar, Host, Query as QueryExtra}; use bytes::Bytes; -use http::{header::CONTENT_TYPE, HeaderMap, HeaderName, HeaderValue, Method, StatusCode}; +use http::{HeaderMap, HeaderName, HeaderValue, Method, StatusCode, header::CONTENT_TYPE}; use tracing::error; use validator::{Validate, ValidationErrors}; diff --git a/samples/server/petstore/rust-axum/output/rust-axum-array-params-test/src/types.rs b/samples/server/petstore/rust-axum/output/rust-axum-array-params-test/src/types.rs index 5c488a6acdc7..57736940b89c 100644 --- a/samples/server/petstore/rust-axum/output/rust-axum-array-params-test/src/types.rs +++ b/samples/server/petstore/rust-axum/output/rust-axum-array-params-test/src/types.rs @@ -1,6 +1,6 @@ use std::{mem, str::FromStr}; -use base64::{engine::general_purpose, Engine}; +use base64::{Engine, engine::general_purpose}; use serde::{Deserialize, Deserializer, Serialize, Serializer}; #[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] diff --git a/samples/server/petstore/rust-axum/output/rust-axum-header-uuid/.openapi-generator/VERSION b/samples/server/petstore/rust-axum/output/rust-axum-header-uuid/.openapi-generator/VERSION index fc74d6ceba8e..5e5282953086 100644 --- a/samples/server/petstore/rust-axum/output/rust-axum-header-uuid/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-axum/output/rust-axum-header-uuid/.openapi-generator/VERSION @@ -1 +1 @@ -7.15.0-SNAPSHOT +7.16.0-SNAPSHOT diff --git a/samples/server/petstore/rust-axum/output/rust-axum-header-uuid/README.md b/samples/server/petstore/rust-axum/output/rust-axum-header-uuid/README.md index 3720f2cf0bc4..6cf3c91bbfe6 100644 --- a/samples/server/petstore/rust-axum/output/rust-axum-header-uuid/README.md +++ b/samples/server/petstore/rust-axum/output/rust-axum-header-uuid/README.md @@ -12,7 +12,7 @@ server, you can easily generate a server stub. To see how to make this your own, look here: [README]((https://openapi-generator.tech)) - API version: 0.1.9 -- Generator version: 7.15.0-SNAPSHOT +- Generator version: 7.16.0-SNAPSHOT diff --git a/samples/server/petstore/rust-axum/output/rust-axum-header-uuid/src/server/mod.rs b/samples/server/petstore/rust-axum/output/rust-axum-header-uuid/src/server/mod.rs index 621da1e90644..91e28a249687 100644 --- a/samples/server/petstore/rust-axum/output/rust-axum-header-uuid/src/server/mod.rs +++ b/samples/server/petstore/rust-axum/output/rust-axum-header-uuid/src/server/mod.rs @@ -3,7 +3,7 @@ use std::collections::HashMap; use axum::{body::Body, extract::*, response::Response, routing::*}; use axum_extra::extract::{CookieJar, Host, Query as QueryExtra}; use bytes::Bytes; -use http::{header::CONTENT_TYPE, HeaderMap, HeaderName, HeaderValue, Method, StatusCode}; +use http::{HeaderMap, HeaderName, HeaderValue, Method, StatusCode, header::CONTENT_TYPE}; use tracing::error; use validator::{Validate, ValidationErrors}; diff --git a/samples/server/petstore/rust-axum/output/rust-axum-header-uuid/src/types.rs b/samples/server/petstore/rust-axum/output/rust-axum-header-uuid/src/types.rs index 1c0eda747f17..ef3ae46aac6a 100644 --- a/samples/server/petstore/rust-axum/output/rust-axum-header-uuid/src/types.rs +++ b/samples/server/petstore/rust-axum/output/rust-axum-header-uuid/src/types.rs @@ -1,6 +1,6 @@ use std::{mem, str::FromStr}; -use base64::{engine::general_purpose, Engine}; +use base64::{Engine, engine::general_purpose}; use serde::{Deserialize, Deserializer, Serialize, Serializer}; #[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] diff --git a/samples/server/petstore/rust-axum/output/rust-axum-oneof/.openapi-generator/VERSION b/samples/server/petstore/rust-axum/output/rust-axum-oneof/.openapi-generator/VERSION index fc74d6ceba8e..5e5282953086 100644 --- a/samples/server/petstore/rust-axum/output/rust-axum-oneof/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-axum/output/rust-axum-oneof/.openapi-generator/VERSION @@ -1 +1 @@ -7.15.0-SNAPSHOT +7.16.0-SNAPSHOT diff --git a/samples/server/petstore/rust-axum/output/rust-axum-oneof/README.md b/samples/server/petstore/rust-axum/output/rust-axum-oneof/README.md index 19e680a90b8c..fbd4443d7366 100644 --- a/samples/server/petstore/rust-axum/output/rust-axum-oneof/README.md +++ b/samples/server/petstore/rust-axum/output/rust-axum-oneof/README.md @@ -12,7 +12,7 @@ server, you can easily generate a server stub. To see how to make this your own, look here: [README]((https://openapi-generator.tech)) - API version: 0.0.1 -- Generator version: 7.15.0-SNAPSHOT +- Generator version: 7.16.0-SNAPSHOT diff --git a/samples/server/petstore/rust-axum/output/rust-axum-oneof/src/models.rs b/samples/server/petstore/rust-axum/output/rust-axum-oneof/src/models.rs index 35e1ac030b25..dbf993dae262 100644 --- a/samples/server/petstore/rust-axum/output/rust-axum-oneof/src/models.rs +++ b/samples/server/petstore/rust-axum/output/rust-axum-oneof/src/models.rs @@ -142,7 +142,7 @@ impl std::str::FromStr for Goodbye { None => { return std::result::Result::Err( "Missing value while parsing Goodbye".to_string(), - ) + ); } }; @@ -161,7 +161,7 @@ impl std::str::FromStr for Goodbye { _ => { return std::result::Result::Err( "Unexpected key while parsing Goodbye".to_string(), - ) + ); } } } @@ -287,7 +287,7 @@ impl std::str::FromStr for GoodbyeD { None => { return std::result::Result::Err( "Missing value while parsing GoodbyeD".to_string(), - ) + ); } }; @@ -301,7 +301,7 @@ impl std::str::FromStr for GoodbyeD { _ => { return std::result::Result::Err( "Unexpected key while parsing GoodbyeD".to_string(), - ) + ); } } } @@ -445,7 +445,7 @@ impl std::str::FromStr for Greeting { None => { return std::result::Result::Err( "Missing value while parsing Greeting".to_string(), - ) + ); } }; @@ -464,7 +464,7 @@ impl std::str::FromStr for Greeting { _ => { return std::result::Result::Err( "Unexpected key while parsing Greeting".to_string(), - ) + ); } } } @@ -590,7 +590,7 @@ impl std::str::FromStr for GreetingD { None => { return std::result::Result::Err( "Missing value while parsing GreetingD".to_string(), - ) + ); } }; @@ -604,7 +604,7 @@ impl std::str::FromStr for GreetingD { _ => { return std::result::Result::Err( "Unexpected key while parsing GreetingD".to_string(), - ) + ); } } } @@ -750,7 +750,7 @@ impl std::str::FromStr for Hello { None => { return std::result::Result::Err( "Missing value while parsing Hello".to_string(), - ) + ); } }; @@ -769,7 +769,7 @@ impl std::str::FromStr for Hello { _ => { return std::result::Result::Err( "Unexpected key while parsing Hello".to_string(), - ) + ); } } } @@ -893,7 +893,7 @@ impl std::str::FromStr for HelloD { None => { return std::result::Result::Err( "Missing value while parsing HelloD".to_string(), - ) + ); } }; @@ -907,7 +907,7 @@ impl std::str::FromStr for HelloD { _ => { return std::result::Result::Err( "Unexpected key while parsing HelloD".to_string(), - ) + ); } } } diff --git a/samples/server/petstore/rust-axum/output/rust-axum-oneof/src/server/mod.rs b/samples/server/petstore/rust-axum/output/rust-axum-oneof/src/server/mod.rs index be80a6a15652..d65aaeb76aaf 100644 --- a/samples/server/petstore/rust-axum/output/rust-axum-oneof/src/server/mod.rs +++ b/samples/server/petstore/rust-axum/output/rust-axum-oneof/src/server/mod.rs @@ -3,7 +3,7 @@ use std::collections::HashMap; use axum::{body::Body, extract::*, response::Response, routing::*}; use axum_extra::extract::{CookieJar, Host, Query as QueryExtra}; use bytes::Bytes; -use http::{header::CONTENT_TYPE, HeaderMap, HeaderName, HeaderValue, Method, StatusCode}; +use http::{HeaderMap, HeaderName, HeaderValue, Method, StatusCode, header::CONTENT_TYPE}; use tracing::error; use validator::{Validate, ValidationErrors}; diff --git a/samples/server/petstore/rust-axum/output/rust-axum-oneof/src/types.rs b/samples/server/petstore/rust-axum/output/rust-axum-oneof/src/types.rs index 5e5733cbf01f..416088221d2d 100644 --- a/samples/server/petstore/rust-axum/output/rust-axum-oneof/src/types.rs +++ b/samples/server/petstore/rust-axum/output/rust-axum-oneof/src/types.rs @@ -1,6 +1,6 @@ use std::{mem, str::FromStr}; -use base64::{engine::general_purpose, Engine}; +use base64::{Engine, engine::general_purpose}; use serde::{Deserialize, Deserializer, Serialize, Serializer}; #[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] diff --git a/samples/server/petstore/rust-axum/output/rust-axum-test/.openapi-generator/VERSION b/samples/server/petstore/rust-axum/output/rust-axum-test/.openapi-generator/VERSION index fc74d6ceba8e..5e5282953086 100644 --- a/samples/server/petstore/rust-axum/output/rust-axum-test/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-axum/output/rust-axum-test/.openapi-generator/VERSION @@ -1 +1 @@ -7.15.0-SNAPSHOT +7.16.0-SNAPSHOT diff --git a/samples/server/petstore/rust-axum/output/rust-axum-test/README.md b/samples/server/petstore/rust-axum/output/rust-axum-test/README.md index 0aecc86d10ac..f0f4d6f5b6a1 100644 --- a/samples/server/petstore/rust-axum/output/rust-axum-test/README.md +++ b/samples/server/petstore/rust-axum/output/rust-axum-test/README.md @@ -12,7 +12,7 @@ server, you can easily generate a server stub. To see how to make this your own, look here: [README]((https://openapi-generator.tech)) - API version: 2.3.4 -- Generator version: 7.15.0-SNAPSHOT +- Generator version: 7.16.0-SNAPSHOT diff --git a/samples/server/petstore/rust-axum/output/rust-axum-test/src/models.rs b/samples/server/petstore/rust-axum/output/rust-axum-test/src/models.rs index c198f0fec8e8..1d09683c0009 100644 --- a/samples/server/petstore/rust-axum/output/rust-axum-test/src/models.rs +++ b/samples/server/petstore/rust-axum/output/rust-axum-test/src/models.rs @@ -142,7 +142,7 @@ impl std::str::FromStr for FooANullableContainer { None => { return std::result::Result::Err( "Missing value while parsing FooANullableContainer".to_string(), - ) + ); } }; @@ -355,7 +355,7 @@ impl std::str::FromStr for FooAllOfObject { None => { return std::result::Result::Err( "Missing value while parsing FooAllOfObject".to_string(), - ) + ); } }; @@ -373,7 +373,7 @@ impl std::str::FromStr for FooAllOfObject { _ => { return std::result::Result::Err( "Unexpected key while parsing FooAllOfObject".to_string(), - ) + ); } } } @@ -456,16 +456,17 @@ impl FooBaseAllOf { impl std::fmt::Display for FooBaseAllOf { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { let params: Vec> = - vec![self - .sample_base_property - .as_ref() - .map(|sample_base_property| { - [ - "sampleBaseProperty".to_string(), - sample_base_property.to_string(), - ] - .join(",") - })]; + vec![ + self.sample_base_property + .as_ref() + .map(|sample_base_property| { + [ + "sampleBaseProperty".to_string(), + sample_base_property.to_string(), + ] + .join(",") + }), + ]; write!( f, @@ -501,7 +502,7 @@ impl std::str::FromStr for FooBaseAllOf { None => { return std::result::Result::Err( "Missing value while parsing FooBaseAllOf".to_string(), - ) + ); } }; @@ -515,7 +516,7 @@ impl std::str::FromStr for FooBaseAllOf { _ => { return std::result::Result::Err( "Unexpected key while parsing FooBaseAllOf".to_string(), - ) + ); } } } @@ -641,7 +642,7 @@ impl std::str::FromStr for FooDummyPutRequest { None => { return std::result::Result::Err( "Missing value while parsing FooDummyPutRequest".to_string(), - ) + ); } }; @@ -659,7 +660,7 @@ impl std::str::FromStr for FooDummyPutRequest { _ => { return std::result::Result::Err( "Unexpected key while parsing FooDummyPutRequest".to_string(), - ) + ); } } } @@ -745,10 +746,11 @@ impl FooGetYamlResponse { /// Should be implemented in a serde serializer impl std::fmt::Display for FooGetYamlResponse { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - let params: Vec> = vec![self - .value - .as_ref() - .map(|value| ["value".to_string(), value.to_string()].join(","))]; + let params: Vec> = vec![ + self.value + .as_ref() + .map(|value| ["value".to_string(), value.to_string()].join(",")), + ]; write!( f, @@ -784,7 +786,7 @@ impl std::str::FromStr for FooGetYamlResponse { None => { return std::result::Result::Err( "Missing value while parsing FooGetYamlResponse".to_string(), - ) + ); } }; @@ -798,7 +800,7 @@ impl std::str::FromStr for FooGetYamlResponse { _ => { return std::result::Result::Err( "Unexpected key while parsing FooGetYamlResponse".to_string(), - ) + ); } } } @@ -917,7 +919,7 @@ impl std::str::FromStr for FooObjectOfObjects { None => { return std::result::Result::Err( "Missing value while parsing FooObjectOfObjects".to_string(), - ) + ); } }; @@ -932,7 +934,7 @@ impl std::str::FromStr for FooObjectOfObjects { _ => { return std::result::Result::Err( "Unexpected key while parsing FooObjectOfObjects".to_string(), - ) + ); } } } @@ -1060,7 +1062,7 @@ impl std::str::FromStr for FooObjectOfObjectsInner { None => { return std::result::Result::Err( "Missing value while parsing FooObjectOfObjectsInner".to_string(), - ) + ); } }; @@ -1078,7 +1080,7 @@ impl std::str::FromStr for FooObjectOfObjectsInner { _ => { return std::result::Result::Err( "Unexpected key while parsing FooObjectOfObjectsInner".to_string(), - ) + ); } } } diff --git a/samples/server/petstore/rust-axum/output/rust-axum-test/src/server/mod.rs b/samples/server/petstore/rust-axum/output/rust-axum-test/src/server/mod.rs index b52ef0300b58..b0be9c78af8f 100644 --- a/samples/server/petstore/rust-axum/output/rust-axum-test/src/server/mod.rs +++ b/samples/server/petstore/rust-axum/output/rust-axum-test/src/server/mod.rs @@ -3,7 +3,7 @@ use std::collections::HashMap; use axum::{body::Body, extract::*, response::Response, routing::*}; use axum_extra::extract::{CookieJar, Host, Query as QueryExtra}; use bytes::Bytes; -use http::{header::CONTENT_TYPE, HeaderMap, HeaderName, HeaderValue, Method, StatusCode}; +use http::{HeaderMap, HeaderName, HeaderValue, Method, StatusCode, header::CONTENT_TYPE}; use tracing::error; use validator::{Validate, ValidationErrors}; diff --git a/samples/server/petstore/rust-axum/output/rust-axum-test/src/types.rs b/samples/server/petstore/rust-axum/output/rust-axum-test/src/types.rs index 00e17f45c180..999330a74f54 100644 --- a/samples/server/petstore/rust-axum/output/rust-axum-test/src/types.rs +++ b/samples/server/petstore/rust-axum/output/rust-axum-test/src/types.rs @@ -1,6 +1,6 @@ use std::{mem, str::FromStr}; -use base64::{engine::general_purpose, Engine}; +use base64::{Engine, engine::general_purpose}; use serde::{Deserialize, Deserializer, Serialize, Serializer}; #[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] diff --git a/samples/server/petstore/rust-axum/output/rust-axum-validation-test/.openapi-generator/VERSION b/samples/server/petstore/rust-axum/output/rust-axum-validation-test/.openapi-generator/VERSION index fc74d6ceba8e..5e5282953086 100644 --- a/samples/server/petstore/rust-axum/output/rust-axum-validation-test/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-axum/output/rust-axum-validation-test/.openapi-generator/VERSION @@ -1 +1 @@ -7.15.0-SNAPSHOT +7.16.0-SNAPSHOT diff --git a/samples/server/petstore/rust-axum/output/rust-axum-validation-test/README.md b/samples/server/petstore/rust-axum/output/rust-axum-validation-test/README.md index c281b779f0b6..b2888b49b37b 100644 --- a/samples/server/petstore/rust-axum/output/rust-axum-validation-test/README.md +++ b/samples/server/petstore/rust-axum/output/rust-axum-validation-test/README.md @@ -12,7 +12,7 @@ server, you can easily generate a server stub. To see how to make this your own, look here: [README]((https://openapi-generator.tech)) - API version: 0.0.1 -- Generator version: 7.15.0-SNAPSHOT +- Generator version: 7.16.0-SNAPSHOT diff --git a/samples/server/petstore/rust-axum/output/rust-axum-validation-test/src/server/mod.rs b/samples/server/petstore/rust-axum/output/rust-axum-validation-test/src/server/mod.rs index c76b7e3d0325..c132fc8c9cb5 100644 --- a/samples/server/petstore/rust-axum/output/rust-axum-validation-test/src/server/mod.rs +++ b/samples/server/petstore/rust-axum/output/rust-axum-validation-test/src/server/mod.rs @@ -3,7 +3,7 @@ use std::collections::HashMap; use axum::{body::Body, extract::*, response::Response, routing::*}; use axum_extra::extract::{CookieJar, Host, Query as QueryExtra}; use bytes::Bytes; -use http::{header::CONTENT_TYPE, HeaderMap, HeaderName, HeaderValue, Method, StatusCode}; +use http::{HeaderMap, HeaderName, HeaderValue, Method, StatusCode, header::CONTENT_TYPE}; use tracing::error; use validator::{Validate, ValidationErrors}; diff --git a/samples/server/petstore/rust-axum/output/rust-axum-validation-test/src/types.rs b/samples/server/petstore/rust-axum/output/rust-axum-validation-test/src/types.rs index ed6bc545eadf..0a808e5a90c5 100644 --- a/samples/server/petstore/rust-axum/output/rust-axum-validation-test/src/types.rs +++ b/samples/server/petstore/rust-axum/output/rust-axum-validation-test/src/types.rs @@ -1,6 +1,6 @@ use std::{mem, str::FromStr}; -use base64::{engine::general_purpose, Engine}; +use base64::{Engine, engine::general_purpose}; use serde::{Deserialize, Deserializer, Serialize, Serializer}; #[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]