Skip to content

Is enum supported? #96

@cihad

Description

@cihad

Why is the enum not working?

{
  "type": "object",
  "properties": {
    "city": {
      "title": "City",
      "enum": ["Foo", "Bar"],
      "x-jsf-presentation": {
        "inputType": "select"
      },
      "type": "string"
    }
  }
}

but it is ok:

{
  "type": "object",
  "properties": {
    "city": {
      "title": "City",
      "oneOf": [
        { "const": "Foo", "title": "Foo" },
        { "const": "Bar", "title": "Bar" }
      ],
      "x-jsf-presentation": {
        "inputType": "select"
      },
      "type": "string"
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfix in v1Is a bug in v0, but fixed in v1new featureNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions