v5 Proposals - sgpinkus/json-schema GitHub Wiki
THIS WIKI IS OBSOLETE. PLEASE SEE THE NEW JSON-SCHEMA-ORG/JSON-SCHEMA-SPEC REPOSITORY.
NOTE: Since this list was proposed, v5 has become a minimal cleanup of v4, so these features are primarily now targeted at v6. These proposals may or may not all be accepted, and others may be added.
General features
$data- allow schemas to use values from the data, specified using Relative JSON Pointers- Multilingual meta-data - allow keywords such as
titleto provide a map from language codes to values (e.g.{"title":{"en":"Example schema", "zh-tw": ...}}) - Use
oneOfwithconstandtitleNamed enumerations - allow annotations for enum values - See
unevaluatedPropertiesDocument "ban unknown properties" mode - an optional (and non-default) extra check for undocumented properties - Custom error messages with
errorskeyword.
Validation/structural features
Allow alternative string values fortype(reverting to v3 behaviour)- Draft-07 includes
ifswitch- allow conditional schemas ("when X, then Y") in a sequence of fallbacks patternGroupsandpatternRequired- likepatternPropertiesbut with min/max constraints andrequiredwith patterns.- In draft-06
contains - In draft-06
const bounding- prevent anyOf/oneOf from failing to the "No valid schemas" error. See Concerns
Hyper-schema features
- Solved with various other draft-06 and draft-07 features
Extended templating syntax - allow templating using data outside the immediate properties, and more - Templating for
reland maybe others - allow extraction of more than just target URIs for links propertyLinks- allow description of parent-child relationship, not just child format (possibly including link relation?)- In draft-05
base - Solved with various other draft-07 features
linkSource- allow a link definition to specify a subject instance other than the data being described
Semantic: format-related (optional)
Any new keywords would be totally non-compulsory, in exactly the same way as format.
formatMinimum/formatMaximum- allow format-specific min/max.- Most in draft-07
Re-introduction of some v3formatvalues:"date","time","utc-millisec"and"regex" - In draft-06 or draft-07 Additional values:
"json-pointer","relative-json-pointer","uri-template" ordered
Meta keywords related
translations- allow i18n for title and description