Description
EDIT: This is now being tracked at json-schema-org/json-schema-vocabularies#2 as its own project.
Please join us there for further discussion!
I propose a separate schema extension for the view definition in the same way hypermedia was separated into its own schema.
JSON Schema Form has a form definition that is array based for ordering, with the majority of its attributes taken from json-schema. It also has titleMap array to define labels for enum fields and can define field types (including custom field types) to use for displaying the field.
As it describes nothing more than a type name it is generator agnostic and not destined to be specific to our Angular implementation. In fact we are already working on making a plain JavaScript version and there is already a React implementation.
The main purpose of raising this here is to highlight a need, in our view, to avoid allowing view based attributes to diminish the data definition purity of the json-schema specification.
Choices and Enum Names would both bring changes to json-schema that would confuse any existing view based frameworks like ours and others while bringing little value and breaking model view separation of concerns. A full json-ui-schema would provide the missing view properties while keeping view and model separate, as they should be in our view.
In addition to a ui-schema, the same way the main json-schema has an extension for hyper media, we would also like consideration for a json-rules-schema for controller/field logic (if/when etc..) and json-flow-schema for workflow/wizard/state management keywords.
I am interested in feedback primarily on the json-ui-schema proposal. But all feedback is welcomed.
Proposal:
JSON Schema UI vocabulary
Child issues:
#252 2017-02-16