diff --git a/utoipa-gen/src/component/schema.rs b/utoipa-gen/src/component/schema.rs index 87c18e57..fb8154a4 100644 --- a/utoipa-gen/src/component/schema.rs +++ b/utoipa-gen/src/component/schema.rs @@ -83,7 +83,6 @@ impl ToTokensDiagnostics for Schema<'_> { self.data, self.attributes, ident, - self.generics, None::>, )?; @@ -107,7 +106,6 @@ impl ToTokensDiagnostics for Schema<'_> { self.data, self.attributes, ident, - self.generics, alias_type_tree? .children .map(|children| children.into_iter().zip(schema_children)), @@ -198,7 +196,6 @@ impl<'a> SchemaVariant<'a> { data: &'a Data, attributes: &'a [Attribute], ident: &'a Ident, - generics: &'a Generics, aliases: Option, ) -> Result, Diagnostics> { match data { @@ -237,7 +234,6 @@ impl<'a> SchemaVariant<'a> { rename_all: named_features.pop_rename_all_feature(), features: named_features, fields: named, - generics: Some(generics), schema_as, aliases: aliases.map(|aliases| aliases.into_iter().collect()), })) @@ -299,7 +295,6 @@ pub struct NamedStructSchema<'a> { pub description: Option, pub features: Option>, pub rename_all: Option, - pub generics: Option<&'a Generics>, pub aliases: Option, &'a TypeTree<'a>)>>, pub schema_as: Option, } @@ -1106,7 +1101,6 @@ impl ComplexEnum<'_> { rename_all: named_struct_features.pop_rename_all_feature(), features: Some(named_struct_features), fields: &named_fields.named, - generics: None, aliases: None, schema_as: None, }), @@ -1208,7 +1202,6 @@ impl ComplexEnum<'_> { rename_all: named_struct_features.pop_rename_all_feature(), features: Some(named_struct_features), fields: &named_fields.named, - generics: None, aliases: None, schema_as: None, })) @@ -1276,7 +1269,6 @@ impl ComplexEnum<'_> { rename_all: named_struct_features.pop_rename_all_feature(), features: Some(named_struct_features), fields: &named_fields.named, - generics: None, aliases: None, schema_as: None, }; @@ -1437,7 +1429,6 @@ impl ComplexEnum<'_> { rename_all: named_struct_features.pop_rename_all_feature(), features: Some(named_struct_features), fields: &named_fields.named, - generics: None, aliases: None, schema_as: None, }; diff --git a/utoipa-gen/src/ext.rs b/utoipa-gen/src/ext.rs index 29d658c7..78b57cef 100644 --- a/utoipa-gen/src/ext.rs +++ b/utoipa-gen/src/ext.rs @@ -221,6 +221,7 @@ fn find_option_type_tree<'t>(ty: &'t TypeTree) -> Option<&'t TypeTree<'t>> { #[cfg_attr(feature = "debug", derive(Debug))] pub struct MacroPath { pub path: String, + #[allow(unused)] // this is needed only if axum, actix or rocket pub args: Vec, } @@ -262,6 +263,7 @@ pub struct ArgValue { pub struct ResolvedOperation { pub path_operation: PathOperation, pub path: String, + #[allow(unused)] // this is needed only if axum, actix or rocket pub body: String, } diff --git a/utoipa-gen/src/path/response/derive.rs b/utoipa-gen/src/path/response/derive.rs index 2175f0b9..9f45627e 100644 --- a/utoipa-gen/src/path/response/derive.rs +++ b/utoipa-gen/src/path/response/derive.rs @@ -349,7 +349,6 @@ impl NamedStructResponse<'_> { aliases: None, description: None, features: None, - generics: None, rename_all: None, struct_name: Cow::Owned(ident.to_string()), schema_as: None, @@ -435,7 +434,6 @@ impl<'p> ToResponseNamedStructResponse<'p> { description: None, fields, features: None, - generics: None, attributes, struct_name: Cow::Owned(ident.to_string()), rename_all: None,