diff --git a/bin/configs/manual/rust-axum-header-uuid.yaml b/bin/configs/manual/rust-axum-header-uuid.yaml index 7e04339b464d..d8bef7f8b015 100644 --- a/bin/configs/manual/rust-axum-header-uuid.yaml +++ b/bin/configs/manual/rust-axum-header-uuid.yaml @@ -6,4 +6,6 @@ generateAliasAsModel: true additionalProperties: hideGenerationTimestamp: "true" packageName: rust-axum-header-uui +globalProperties: + skipFormModel: "false" enablePostProcessFile: true diff --git a/bin/configs/manual/rust-axum-multipart-v3.yaml b/bin/configs/manual/rust-axum-multipart-v3.yaml index 13f7d4a33680..45a557ccd74b 100644 --- a/bin/configs/manual/rust-axum-multipart-v3.yaml +++ b/bin/configs/manual/rust-axum-multipart-v3.yaml @@ -7,4 +7,6 @@ additionalProperties: hideGenerationTimestamp: "true" allowBlockingResponseSerialize: "true" packageName: multipart-v3 +globalProperties: + skipFormModel: false enablePostProcessFile: true diff --git a/bin/configs/manual/rust-axum-openapi-v3.yaml b/bin/configs/manual/rust-axum-openapi-v3.yaml index 35ae45d6950e..8c4942972a9a 100644 --- a/bin/configs/manual/rust-axum-openapi-v3.yaml +++ b/bin/configs/manual/rust-axum-openapi-v3.yaml @@ -7,4 +7,6 @@ additionalProperties: hideGenerationTimestamp: "true" allowBlockingValidator: "true" packageName: openapi-v3 +globalProperties: + skipFormModel: false enablePostProcessFile: true diff --git a/bin/configs/manual/rust-axum-ops-v3.yaml b/bin/configs/manual/rust-axum-ops-v3.yaml index cf2f6a10e475..2a1864f269fb 100644 --- a/bin/configs/manual/rust-axum-ops-v3.yaml +++ b/bin/configs/manual/rust-axum-ops-v3.yaml @@ -6,4 +6,6 @@ generateAliasAsModel: true additionalProperties: hideGenerationTimestamp: "true" packageName: ops-v3 +globalProperties: + skipFormModel: false enablePostProcessFile: true diff --git a/bin/configs/manual/rust-axum-ping-bearer-auth-v3.yaml b/bin/configs/manual/rust-axum-ping-bearer-auth-v3.yaml index 573a6b9f1993..1a8a2ea5eca1 100644 --- a/bin/configs/manual/rust-axum-ping-bearer-auth-v3.yaml +++ b/bin/configs/manual/rust-axum-ping-bearer-auth-v3.yaml @@ -6,4 +6,6 @@ generateAliasAsModel: true additionalProperties: hideGenerationTimestamp: "true" packageName: ping-bearer-auth +globalProperties: + skipFormModel: false enablePostProcessFile: true diff --git a/bin/configs/manual/rust-axum-test.yaml b/bin/configs/manual/rust-axum-test.yaml index b73b3fb53139..c15e2e77aaa1 100644 --- a/bin/configs/manual/rust-axum-test.yaml +++ b/bin/configs/manual/rust-axum-test.yaml @@ -6,4 +6,6 @@ generateAliasAsModel: true additionalProperties: hideGenerationTimestamp: "true" packageName: rust-server-test +globalProperties: + skipFormModel: false enablePostProcessFile: true diff --git a/bin/configs/manual/rust-axum-validation.yaml b/bin/configs/manual/rust-axum-validation.yaml index 3fd5ba01b5e6..4f4fef0378a0 100644 --- a/bin/configs/manual/rust-axum-validation.yaml +++ b/bin/configs/manual/rust-axum-validation.yaml @@ -7,4 +7,6 @@ additionalProperties: hideGenerationTimestamp: "true" packageName: rust-axum-validation-test disableValidator: "true" +globalProperties: + skipFormModel: false enablePostProcessFile: true diff --git a/modules/openapi-generator/src/main/resources/rust-axum/models.mustache b/modules/openapi-generator/src/main/resources/rust-axum/models.mustache index 44ed4ed6bf4b..f3c4088bd7b3 100644 --- a/modules/openapi-generator/src/main/resources/rust-axum/models.mustache +++ b/modules/openapi-generator/src/main/resources/rust-axum/models.mustache @@ -542,7 +542,6 @@ impl std::str::FromStr for {{{classname}}} { {{/arrayModelType}} {{^arrayModelType}} {{! general struct}} - {{#anyOf.size}} /// Any of: {{#anyOf}} @@ -575,7 +574,6 @@ impl PartialEq for {{{classname}}} { } } {{/anyOf.size}} - {{#oneOf.size}} /// One of: {{#oneOf}} @@ -608,7 +606,6 @@ impl PartialEq for {{{classname}}} { } } {{/oneOf.size}} - {{^anyOf.size}} {{^oneOf.size}} #[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize, validator::Validate)] diff --git a/modules/openapi-generator/src/main/resources/rust-axum/types.mustache b/modules/openapi-generator/src/main/resources/rust-axum/types.mustache index 67e1705ca3c4..5dcf300461e4 100644 --- a/modules/openapi-generator/src/main/resources/rust-axum/types.mustache +++ b/modules/openapi-generator/src/main/resources/rust-axum/types.mustache @@ -530,7 +530,7 @@ impl Nullable { } } -impl<'a, T: Clone> Nullable<&'a T> { +impl Nullable<&T> { /// Maps an `Nullable<&T>` to an `Nullable` by cloning the contents of the /// Nullable. /// 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 17f2442ff3bc..6935482704c1 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.9.0-SNAPSHOT +7.10.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 c0bbd503dd1f..2fef39669660 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.9.0-SNAPSHOT +- Generator version: 7.10.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 96b2e575f595..e82cb7dda574 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 @@ -164,6 +164,195 @@ impl std::convert::TryFrom for header::IntoHeaderValue, + + #[serde(rename = "object_field")] + #[serde(skip_serializing_if = "Option::is_none")] + pub object_field: Option, + + #[serde(rename = "binary_field")] + pub binary_field: ByteArray, +} + +impl MultipartRequest { + #[allow(clippy::new_without_default, clippy::too_many_arguments)] + pub fn new(string_field: String, binary_field: ByteArray) -> MultipartRequest { + MultipartRequest { + string_field, + optional_string_field: None, + object_field: None, + binary_field, + } + } +} + +/// Converts the MultipartRequest value to the Query Parameters representation (style=form, explode=false) +/// specified in https://swagger.io/docs/specification/serialization/ +/// Should be implemented in a serde serializer +impl std::fmt::Display for MultipartRequest { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let params: Vec> = vec![ + Some("string_field".to_string()), + Some(self.string_field.to_string()), + self.optional_string_field + .as_ref() + .map(|optional_string_field| { + [ + "optional_string_field".to_string(), + optional_string_field.to_string(), + ] + .join(",") + }), + // Skipping object_field in query parameter serialization + + // Skipping binary_field in query parameter serialization + // Skipping binary_field in query parameter serialization + ]; + + write!( + f, + "{}", + params.into_iter().flatten().collect::>().join(",") + ) + } +} + +/// Converts Query Parameters representation (style=form, explode=false) to a MultipartRequest value +/// as specified in https://swagger.io/docs/specification/serialization/ +/// Should be implemented in a serde deserializer +impl std::str::FromStr for MultipartRequest { + type Err = String; + + fn from_str(s: &str) -> std::result::Result { + /// An intermediate representation of the struct to use for parsing. + #[derive(Default)] + #[allow(dead_code)] + struct IntermediateRep { + pub string_field: Vec, + pub optional_string_field: Vec, + pub object_field: Vec, + pub binary_field: Vec, + } + + let mut intermediate_rep = IntermediateRep::default(); + + // Parse into intermediate representation + let mut string_iter = s.split(','); + let mut key_result = string_iter.next(); + + while key_result.is_some() { + let val = match string_iter.next() { + Some(x) => x, + None => { + return std::result::Result::Err( + "Missing value while parsing MultipartRequest".to_string(), + ) + } + }; + + if let Some(key) = key_result { + #[allow(clippy::match_single_binding)] + match key { + #[allow(clippy::redundant_clone)] + "string_field" => intermediate_rep.string_field.push( + ::from_str(val).map_err(|x| x.to_string())?, + ), + #[allow(clippy::redundant_clone)] + "optional_string_field" => intermediate_rep.optional_string_field.push( + ::from_str(val).map_err(|x| x.to_string())?, + ), + #[allow(clippy::redundant_clone)] + "object_field" => intermediate_rep.object_field.push( + ::from_str(val) + .map_err(|x| x.to_string())?, + ), + "binary_field" => return std::result::Result::Err( + "Parsing binary data in this style is not supported in MultipartRequest" + .to_string(), + ), + _ => { + return std::result::Result::Err( + "Unexpected key while parsing MultipartRequest".to_string(), + ) + } + } + } + + // Get the next key + key_result = string_iter.next(); + } + + // Use the intermediate representation to return the struct + std::result::Result::Ok(MultipartRequest { + string_field: intermediate_rep + .string_field + .into_iter() + .next() + .ok_or_else(|| "string_field missing in MultipartRequest".to_string())?, + optional_string_field: intermediate_rep.optional_string_field.into_iter().next(), + object_field: intermediate_rep.object_field.into_iter().next(), + binary_field: intermediate_rep + .binary_field + .into_iter() + .next() + .ok_or_else(|| "binary_field missing in MultipartRequest".to_string())?, + }) + } +} + +// Methods for converting between header::IntoHeaderValue and HeaderValue + +#[cfg(feature = "server")] +impl std::convert::TryFrom> for HeaderValue { + type Error = String; + + fn try_from( + hdr_value: header::IntoHeaderValue, + ) -> std::result::Result { + let hdr_value = hdr_value.to_string(); + match HeaderValue::from_str(&hdr_value) { + std::result::Result::Ok(value) => std::result::Result::Ok(value), + std::result::Result::Err(e) => std::result::Result::Err(format!( + "Invalid header value for MultipartRequest - value: {} is invalid {}", + hdr_value, e + )), + } + } +} + +#[cfg(feature = "server")] +impl std::convert::TryFrom for header::IntoHeaderValue { + type Error = String; + + fn try_from(hdr_value: HeaderValue) -> std::result::Result { + match hdr_value.to_str() { + std::result::Result::Ok(value) => { + match ::from_str(value) { + std::result::Result::Ok(value) => { + std::result::Result::Ok(header::IntoHeaderValue(value)) + } + std::result::Result::Err(err) => std::result::Result::Err(format!( + "Unable to convert header value '{}' into MultipartRequest - {}", + value, err + )), + } + } + std::result::Result::Err(e) => std::result::Result::Err(format!( + "Unable to convert header: {:?} to string: {}", + hdr_value, e + )), + } + } +} + #[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize, validator::Validate)] #[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))] pub struct MultipartRequestObjectField { 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 0e80a9b0a42a..ecccdaa5ec89 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 @@ -530,7 +530,7 @@ impl Nullable { } } -impl<'a, T: Clone> Nullable<&'a T> { +impl Nullable<&T> { /// Maps an `Nullable<&T>` to an `Nullable` by cloning the contents of the /// Nullable. /// 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 17f2442ff3bc..6935482704c1 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.9.0-SNAPSHOT +7.10.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 4b9ef356ee1f..207b5efcb324 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.9.0-SNAPSHOT +- Generator version: 7.10.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 87d1c7fd8ca8..5437c7abd43b 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 @@ -570,7 +570,6 @@ impl std::ops::DerefMut for AnotherXmlInner { } /// An XML object - #[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize, validator::Validate)] #[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))] pub struct AnotherXmlObject { @@ -735,7 +734,6 @@ impl PartialEq for AnyOfGet202Response { } /// Test a model containing an anyOf of a hash map - /// Any of: /// - String /// - std::collections::HashMap @@ -766,7 +764,6 @@ impl PartialEq for AnyOfHashMapObject { } /// Test a model containing an anyOf - /// Any of: /// - String #[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] @@ -796,7 +793,6 @@ impl PartialEq for AnyOfObject { } /// Test containing an anyOf object - #[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize, validator::Validate)] #[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))] pub struct AnyOfProperty { @@ -952,7 +948,6 @@ impl std::convert::TryFrom for header::IntoHeaderValue>, +} + +impl FormTestRequest { + #[allow(clippy::new_without_default, clippy::too_many_arguments)] + pub fn new() -> FormTestRequest { + FormTestRequest { + required_array: None, + } + } +} + +/// Converts the FormTestRequest value to the Query Parameters representation (style=form, explode=false) +/// specified in https://swagger.io/docs/specification/serialization/ +/// Should be implemented in a serde serializer +impl std::fmt::Display for FormTestRequest { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let params: Vec> = + vec![self.required_array.as_ref().map(|required_array| { + [ + "requiredArray".to_string(), + required_array + .iter() + .map(|x| x.to_string()) + .collect::>() + .join(","), + ] + .join(",") + })]; + + write!( + f, + "{}", + params.into_iter().flatten().collect::>().join(",") + ) + } +} + +/// Converts Query Parameters representation (style=form, explode=false) to a FormTestRequest value +/// as specified in https://swagger.io/docs/specification/serialization/ +/// Should be implemented in a serde deserializer +impl std::str::FromStr for FormTestRequest { + type Err = String; + + fn from_str(s: &str) -> std::result::Result { + /// An intermediate representation of the struct to use for parsing. + #[derive(Default)] + #[allow(dead_code)] + struct IntermediateRep { + pub required_array: Vec>, + } + + let mut intermediate_rep = IntermediateRep::default(); + // Parse into intermediate representation + let mut string_iter = s.split(','); + let mut key_result = string_iter.next(); + + while key_result.is_some() { + let val = match string_iter.next() { + Some(x) => x, + None => { + return std::result::Result::Err( + "Missing value while parsing FormTestRequest".to_string(), + ) + } + }; + + if let Some(key) = key_result { + #[allow(clippy::match_single_binding)] + match key { + "requiredArray" => { + 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(), + ) + } + } + } + + // Get the next key + key_result = string_iter.next(); + } + + // Use the intermediate representation to return the struct + std::result::Result::Ok(FormTestRequest { + required_array: intermediate_rep.required_array.into_iter().next(), + }) + } +} + +// Methods for converting between header::IntoHeaderValue and HeaderValue + +#[cfg(feature = "server")] +impl std::convert::TryFrom> for HeaderValue { + type Error = String; + + fn try_from( + hdr_value: header::IntoHeaderValue, + ) -> std::result::Result { + let hdr_value = hdr_value.to_string(); + match HeaderValue::from_str(&hdr_value) { + std::result::Result::Ok(value) => std::result::Result::Ok(value), + std::result::Result::Err(e) => std::result::Result::Err(format!( + "Invalid header value for FormTestRequest - value: {} is invalid {}", + hdr_value, e + )), + } + } +} + +#[cfg(feature = "server")] +impl std::convert::TryFrom for header::IntoHeaderValue { + type Error = String; + + fn try_from(hdr_value: HeaderValue) -> std::result::Result { + match hdr_value.to_str() { + std::result::Result::Ok(value) => { + match ::from_str(value) { + std::result::Result::Ok(value) => { + std::result::Result::Ok(header::IntoHeaderValue(value)) + } + std::result::Result::Err(err) => std::result::Result::Err(format!( + "Unable to convert header value '{}' into FormTestRequest - {}", + value, err + )), + } + } + std::result::Result::Err(e) => std::result::Result::Err(format!( + "Unable to convert header: {:?} to string: {}", + hdr_value, e + )), + } + } +} + +/// Test a model containing an anyOf that starts with a number /// Any of: /// - String #[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] @@ -3085,7 +3225,6 @@ impl std::ops::DerefMut for XmlInner { } /// An XML object - #[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize, validator::Validate)] #[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))] pub struct XmlObject { 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 57a48986f26e..49666e366a0e 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 @@ -530,7 +530,7 @@ impl Nullable { } } -impl<'a, T: Clone> Nullable<&'a T> { +impl Nullable<&T> { /// Maps an `Nullable<&T>` to an `Nullable` by cloning the contents of the /// Nullable. /// 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 17f2442ff3bc..6935482704c1 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.9.0-SNAPSHOT +7.10.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 cff61b75e56a..2a5a944ad346 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.9.0-SNAPSHOT +- Generator version: 7.10.0-SNAPSHOT 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 6b0bc059787f..886345d8556d 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 @@ -530,7 +530,7 @@ impl Nullable { } } -impl<'a, T: Clone> Nullable<&'a T> { +impl Nullable<&T> { /// Maps an `Nullable<&T>` to an `Nullable` by cloning the contents of the /// Nullable. /// 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 17f2442ff3bc..6935482704c1 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.9.0-SNAPSHOT +7.10.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 dfeabcd3e072..66f09c3b89f4 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.9.0-SNAPSHOT +- Generator version: 7.10.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 591189ae1f1d..608d5b3175c0 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 @@ -1753,7 +1753,6 @@ impl std::convert::TryFrom for header::IntoHeaderValue { } /// Model for testing model with \"_class\" property - #[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize, validator::Validate)] #[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))] pub struct ClassModel { @@ -3695,7 +3694,6 @@ impl std::convert::TryFrom } /// Model for testing model name starting with number - #[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize, validator::Validate)] #[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))] pub struct Model200Response { @@ -3848,7 +3846,6 @@ impl std::convert::TryFrom for header::IntoHeaderValue for header::IntoHeaderValue Nullable { } } -impl<'a, T: Clone> Nullable<&'a T> { +impl Nullable<&T> { /// Maps an `Nullable<&T>` to an `Nullable` by cloning the contents of the /// Nullable. /// 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 17f2442ff3bc..6935482704c1 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.9.0-SNAPSHOT +7.10.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 57f4554ba185..bad83d5ef10c 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.9.0-SNAPSHOT +- Generator version: 7.10.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 b3e7b9da0cba..6a84bb364976 100644 --- a/samples/server/petstore/rust-axum/output/petstore/src/models.rs +++ b/samples/server/petstore/rust-axum/output/petstore/src/models.rs @@ -113,7 +113,6 @@ pub struct UpdateUserPathParams { } /// Describes the result of uploading an image resource - #[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize, validator::Validate)] #[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))] pub struct ApiResponse { @@ -280,7 +279,6 @@ impl std::convert::TryFrom for header::IntoHeaderValue } /// A category for a pet - #[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize, validator::Validate)] #[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))] pub struct Category { @@ -440,7 +438,6 @@ impl std::convert::TryFrom for header::IntoHeaderValue { } /// An order for a pets from the pet store - #[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize, validator::Validate)] #[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))] pub struct Order { @@ -648,7 +645,6 @@ impl std::convert::TryFrom for header::IntoHeaderValue { } /// A pet for sale in the pet store - #[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize, validator::Validate)] #[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))] pub struct Pet { @@ -862,7 +858,6 @@ impl std::convert::TryFrom for header::IntoHeaderValue { } /// A tag for a pet - #[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize, validator::Validate)] #[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))] pub struct Tag { @@ -1320,7 +1315,6 @@ impl std::convert::TryFrom for header::IntoHeaderValue Nullable { } } -impl<'a, T: Clone> Nullable<&'a T> { +impl Nullable<&T> { /// Maps an `Nullable<&T>` to an `Nullable` by cloning the contents of the /// Nullable. /// 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 17f2442ff3bc..6935482704c1 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.9.0-SNAPSHOT +7.10.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 8cd88c02ecf7..1b64ea5db3ed 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.9.0-SNAPSHOT +- Generator version: 7.10.0-SNAPSHOT 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 8337a8139d55..17d9a9efec94 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 @@ -530,7 +530,7 @@ impl Nullable { } } -impl<'a, T: Clone> Nullable<&'a T> { +impl Nullable<&T> { /// Maps an `Nullable<&T>` to an `Nullable` by cloning the contents of the /// Nullable. /// 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 17f2442ff3bc..6935482704c1 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.9.0-SNAPSHOT +7.10.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 e7753c376ae7..c02b2c33f229 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.9.0-SNAPSHOT +- Generator version: 7.10.0-SNAPSHOT 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 03e061b4399b..58223871646a 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 @@ -530,7 +530,7 @@ impl Nullable { } } -impl<'a, T: Clone> Nullable<&'a T> { +impl Nullable<&T> { /// Maps an `Nullable<&T>` to an `Nullable` by cloning the contents of the /// Nullable. /// 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 17f2442ff3bc..6935482704c1 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.9.0-SNAPSHOT +7.10.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 f33c5dc7c31e..cb953a6fb1ef 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.9.0-SNAPSHOT +- Generator version: 7.10.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 01b23cb9db8d..748d8c7dcefb 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 @@ -672,7 +672,6 @@ impl std::convert::TryFrom for header::IntoHeaderValue for header::IntoHeaderValue Nullable { } } -impl<'a, T: Clone> Nullable<&'a T> { +impl Nullable<&T> { /// Maps an `Nullable<&T>` to an `Nullable` by cloning the contents of the /// Nullable. /// 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 17f2442ff3bc..6935482704c1 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.9.0-SNAPSHOT +7.10.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 40d7622db2fd..a5ce8d3f4103 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.9.0-SNAPSHOT +- Generator version: 7.10.0-SNAPSHOT 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 fafa1faa28b4..e25e61d29dda 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 @@ -530,7 +530,7 @@ impl Nullable { } } -impl<'a, T: Clone> Nullable<&'a T> { +impl Nullable<&T> { /// Maps an `Nullable<&T>` to an `Nullable` by cloning the contents of the /// Nullable. ///