Skip to content

Commit

Permalink
feat: updating jsonschema validation to allow null for min and max
Browse files Browse the repository at this point in the history
  • Loading branch information
simojo committed Sep 22, 2023
1 parent 682f54c commit 6f08084
Showing 1 changed file with 28 additions and 4 deletions.
32 changes: 28 additions & 4 deletions chasten/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,43 @@
"anyOf": [
{
"type": "object",
"properties": {"min": {"type": "integer"}},
"properties": {
"min": {
"anyOf": [
{"type": "integer"},
{"type": "null"},
]
}
},
"required": ["min"],
},
{
"type": "object",
"properties": {"max": {"type": "integer"}},
"properties": {
"max": {
"anyOf": [
{"type": "integer"},
{"type": "null"},
]
}
},
"required": ["max"],
},
{
"type": "object",
"properties": {
"min": {"type": "integer"},
"max": {"type": "integer"},
"min": {
"anyOf": [
{"type": "integer"},
{"type": "null"},
]
},
"max": {
"anyOf": [
{"type": "integer"},
{"type": "null"},
]
},
},
"required": ["min", "max"],
},
Expand Down

0 comments on commit 6f08084

Please sign in to comment.