Skip to content

Model conditional variants #16

@simontaurus

Description

@simontaurus

Sometimes there's the need to express variant of a schema that apply under certain conditions.
Such variant may
A. only change the representation of the schema (e.g. display/hide fields, change labels, etc.)
B. actually change the schema (e.g. add fields or make additional fields mandatory)

JSON-SCHEMA provides the following options:

Limitations of JSON-SCHEMA based tools:

Current recommendation is to use oneOf for both cases A and B. Once bugs in https://github.com/json-editor/json-editor are fixed, if-then-else is recommended for cases A

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