8000 Cfgu enum type is always required · Issue #687 · configu/configu · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Cfgu enum type is always required #687
Open
@davidmeirlevy

Description

@davidmeirlevy

Current Behavior

  1. create a cfgu file.

  2. add a key with enum: [...any values you wish]

  3. validate the cfgu with an empty object.

  4. try to explicitly add required: false

Expected Behavior

The key is not required, so an empty value should be valid.

To Reproduce

  1. create a cfgu file.

  2. add a key with enum: [...any values you wish]

  3. validate the cfgu with an empty object. -> should be valid.

  4. 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">

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0