v5 Proposals - sgpinkus/json-schema GitHub Wiki
JSON-SCHEMA-ORG/JSON-SCHEMA-SPEC REPOSITORY.
THIS WIKI IS OBSOLETE. PLEASE SEE THE NEWNOTE: 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
title
to provide a map from language codes to values (e.g.{"title":{"en":"Example schema", "zh-tw": ...}}
) - Use
oneOf
withconst
andtitle
Named enumerations - allow annotations for enum values - See
unevaluatedProperties
Document "ban unknown properties" mode - an optional (and non-default) extra check for undocumented properties - Custom error messages with
errors
keyword.
Validation/structural features
Allow alternative string values fortype
(reverting to v3 behaviour)- Draft-07 includes
if
switch
- allow conditional schemas ("when X, then Y") in a sequence of fallbacks patternGroups
andpatternRequired
- likepatternProperties
but with min/max constraints andrequired
with 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
rel
and 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
format
-related (optional)
Semantic: 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 v3format
values:"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