Allow setting validation attributes via #[schemars(...)]
This commit is contained in:
parent
c013052f59
commit
7914593d89
17 changed files with 607 additions and 99 deletions
|
@ -23,7 +23,9 @@
|
|||
},
|
||||
"myNumber": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
"format": "int32",
|
||||
"maximum": 10.0,
|
||||
"minimum": 1.0
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
|
@ -31,7 +33,8 @@
|
|||
"MyEnum": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"format": "phone"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
|
@ -44,7 +47,9 @@
|
|||
"items": {
|
||||
"type": "number",
|
||||
"format": "float"
|
||||
}
|
||||
},
|
||||
"maxItems": 100,
|
||||
"minItems": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue