Use anyOf

This commit is contained in:
Jordan Bradford
2024-11-14 12:07:35 -05:00
parent 6531b6b7aa
commit 73331f28fd

View File

@@ -79,23 +79,16 @@ config_schema = {
"description": "User CPU and memory limits.", "description": "User CPU and memory limits.",
"type": "object", "type": "object",
"additionalProperties": False, "additionalProperties": False,
"properties": {"memory": {"type": "string"}, "cpu": { "properties": {
"oneOf": [ "memory": {"type": "string"},
{ "cpu": {
"type": "integer", "anyOf": [
"minimum": 0 {"type": "integer", "minimum": 0},
{"type": "number", "minimum": 0},
{"type": "string", "enum": ["None"]},
]
}, },
{ },
"type": "number",
"minimum": 0
},
{
"type": "string",
"enum": ["None"]
}
]
}
},
}, },
"UserEnvironment": { "UserEnvironment": {
"type": "object", "type": "object",