mirror of
https://gitlab.com/msrd0/gotham-restful.git
synced 2025-02-22 20:52:27 +00:00
make enums a non-inlined schema
This commit is contained in:
parent
d60d369f7f
commit
dc4de30a71
1 changed files with 9 additions and 2 deletions
|
@ -82,11 +82,18 @@ fn expand_enum(input : ItemEnum) -> TokenStream2
|
|||
|
||||
#(#variants)*
|
||||
|
||||
OpenapiSchema::new(SchemaKind::Type(Type::String(StringType {
|
||||
let schema = SchemaKind::Type(Type::String(StringType {
|
||||
format: VariantOrUnknownOrEmpty::Empty,
|
||||
enumeration,
|
||||
..Default::default()
|
||||
})))
|
||||
}));
|
||||
|
||||
OpenapiSchema {
|
||||
name: Some(stringify!(#ident).to_string()),
|
||||
nullable: false,
|
||||
schema,
|
||||
dependencies: Default::default()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue