Skip to content

enums with arbitrary values #665

@coderextreme

Description

@coderextreme

We'd like enums with arbitrary values. I don't know as JSON schema supports this easily (think multiple enums with oneOf's), except as arbitrary values (type string). The enum's non arbitrary values provide useful "user interface". In other words, we'd like a pull down list with some default values and a type-in (but we can drive this user interface from somewhere else...it's not necessary in JSON schema. But a reasonable error report from validation suggesting possible values would be welcome.

I'm currently using draft-07. I don't really have a solution, except perhaps change enum to "optional_values" or "default_values" when this occurs. I don't really have good names either.

I'm waiting for some god to pronounce the solution to my problems already exists in draft-07.

I'm starting to think our object model will provide an adequate schema, since our schema is derived from it!

Thanks,

John

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions