Skip to content

Commit

Permalink
Use anyOf
Browse files Browse the repository at this point in the history
  • Loading branch information
jrdnbradford committed Nov 14, 2024
1 parent 6531b6b commit 73331f2
Showing 1 changed file with 9 additions and 16 deletions.
25 changes: 9 additions & 16 deletions tljh/config_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,23 +79,16 @@
"description": "User CPU and memory limits.",
"type": "object",
"additionalProperties": False,
"properties": {"memory": {"type": "string"}, "cpu": {
"oneOf": [
{
"type": "integer",
"minimum": 0
},
{
"type": "number",
"minimum": 0
"properties": {
"memory": {"type": "string"},
"cpu": {
"anyOf": [
{"type": "integer", "minimum": 0},
{"type": "number", "minimum": 0},
{"type": "string", "enum": ["None"]},
]
},
{
"type": "string",
"enum": ["None"]
}
]
}
},
},
},
"UserEnvironment": {
"type": "object",
Expand Down

0 comments on commit 73331f2

Please sign in to comment.