Set type on enum schemas (#28)
This commit is contained in:
parent
f4c8e7d4d3
commit
ea351f3b42
7 changed files with 7 additions and 0 deletions
|
@ -89,6 +89,7 @@ fn expr_for_external_tagged_enum<'a>(
|
|||
|
||||
let unit_names = unit_variants.iter().map(|v| v.name());
|
||||
let unit_schema = schema_object(quote! {
|
||||
instance_type: Some(schemars::schema::InstanceType::String.into()),
|
||||
enum_values: Some(vec![#(#unit_names.into()),*]),
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue