Support JSON Schema draft 2020-12 and use it by default (#294)

This commit is contained in:
Graham Esau 2024-05-19 20:49:45 +01:00 committed by GitHub
parent 95475ad1b4
commit 3aa0e7fa3c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
88 changed files with 369 additions and 210 deletions

View file

@ -422,7 +422,7 @@ fn expr_for_tuple_struct(fields: &[Field]) -> TokenStream {
quote! {
schemars::json_schema!({
"type": "array",
"items": [#((#fields)),*],
"prefixItems": [#((#fields)),*],
"minItems": #len,
"maxItems": #len,
})