Open
Description
Current Behavior
-
create a cfgu file.
-
add a key with
enum: [...any values you wish]
-
validate the cfgu with an empty object.
-
try to explicitly add
required: false
Expected Behavior
The key is not required, so an empty value should be valid.
To Reproduce
-
create a cfgu file.
-
add a key with
enum: [...any values you wish]
-
validate the cfgu with an empty object. -> should be valid.
-
try to explicitly add
required: false
. -> should be valid.
Context
Seems like required: false
is ignored, even when we explicitly mention it.
JSONSchema supports enum not to be required.
For example, check this schema:
{
"type": "object",
"properties": {
"a": {"type": "string", "enum": ["a","b"]}
}
}
an empty object is a valid value for this schema.
<
4529
div height="sm" width="random" class="Box-sc-g0xbh4-0 LoadingSkeleton-sc-695d630a-0 hpcToU cMnbhf">