From 8c4299941acd110c30a4e59a62c9ac79314f540e Mon Sep 17 00:00:00 2001 From: Henry Andrews Date: Tue, 11 May 2021 11:38:59 -0700 Subject: [PATCH 1/3] Clarify vocab specs needn't be formal or published. --- jsonschema-core.xml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/jsonschema-core.xml b/jsonschema-core.xml index a93c377d..88561c39 100644 --- a/jsonschema-core.xml +++ b/jsonschema-core.xml @@ -399,6 +399,13 @@ of any vocabulary, there is no analogous mechanism to indicate individual keyword usage. + + A schema vocabulary can be defined by anything from an informal description + to a standards proposal, depending on the audience and interoperability + expectations. In particular, in order to facilitate vocabulary use within + non-public organizations, a vocabulary specification need not be published + outside of its scope of use. +
From 6a4183ef2d46d9c65aa0ea56a2e4003eddbca263 Mon Sep 17 00:00:00 2001 From: Henry Andrews Date: Tue, 11 May 2021 10:28:30 -0700 Subject: [PATCH 2/3] Remove redundant meta-schema update process notes This is covered for the entire spec as section 8.1.3. Note that the validation spec also has this, but only once in that document, so nothing else needs deleting. --- jsonschema-core.xml | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/jsonschema-core.xml b/jsonschema-core.xml index a93c377d..c73f0ce1 100644 --- a/jsonschema-core.xml +++ b/jsonschema-core.xml @@ -2061,13 +2061,6 @@ The current URI for the corresponding meta-schema is: . - - Updated vocabulary and meta-schema URIs MAY be published between - specification drafts in order to correct errors. Implementations - SHOULD consider URIs dated after this specification draft and - before the next to indicate the same syntax and semantics - as those listed here. -
Schema keywords typically operate independently, without @@ -2497,13 +2490,6 @@ The current URI for the corresponding meta-schema is: . - - Updated vocabulary and meta-schema URIs MAY be published between - specification drafts in order to correct errors. Implementations - SHOULD consider URIs dated after this specification draft and - before the next to indicate the same syntax and semantics - as those listed here. -
From c11f899ab5d20657218c54ae95108d090229dc1f Mon Sep 17 00:00:00 2001 From: Adam Kecskes Date: Wed, 7 Jul 2021 11:01:21 +0200 Subject: [PATCH 3/3] Add namedExamples --- jsonschema-validation.xml | 18 ++++++++++++++++++ meta/meta-data.json | 3 +++ 2 files changed, 21 insertions(+) diff --git a/jsonschema-validation.xml b/jsonschema-validation.xml index e12c6cd2..3a3cbf61 100644 --- a/jsonschema-validation.xml +++ b/jsonschema-validation.xml @@ -1241,6 +1241,24 @@ an additional example. If "examples" is absent, "default" MAY still be used in this manner. + + Implementations MAY use the values of "namedExamples", if present, as + additional examples. If "examples" is absent, "namedExamples" + MAY still be used in this manner. + +
+ +
+ + The value of this keyword MUST be an object. + There are no restrictions placed on the values within the object. + + + This keyword can be used to provide named sample JSON values associated with a + particular schema, for the purpose of illustrating usage, and to make them + available for referencing outside of the schema. It is RECOMMENDED that these + values be valid against the associated schema. +
diff --git a/meta/meta-data.json b/meta/meta-data.json index 05cbc22a..7a48a934 100644 --- a/meta/meta-data.json +++ b/meta/meta-data.json @@ -32,6 +32,9 @@ "examples": { "type": "array", "items": true + }, + "namedExamples": { + "type": "object" } } }