You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _docs/schema/vocabs/data-2023.md
+11-11Lines changed: 11 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ title: A Vocabulary for Accessing Data Stored in JSON (2023)
4
4
bookmark: data (2023)
5
5
permalink: /schema/vocabs/data-2023/
6
6
icon: fas fa-tag
7
-
order: "1.8.4"
7
+
order: "01.8.2"
8
8
---
9
9
## 1. Purpose {#purpose}
10
10
@@ -29,17 +29,17 @@ The meta-schema which validates keyword usage for this vocabulary can be found a
29
29
30
30
## 3. Definitions {#definitions}
31
31
32
-
### 3.1 Formed Schema {#formed-schema}
32
+
### 3.1. Formed Schema {#formed-schema}
33
33
34
34
The schema object created as a result of dereferencing all of the values in either the `data` or `optionalData` keywords as described in section 4.1. That is, each keyword produces an independent formed schema.
35
35
36
-
### 3.2 Host Schema {#host-schema}
36
+
### 3.2. Host Schema {#host-schema}
37
37
38
38
The schema object which contains either the `data` or `optionalData` keyword. The processing rules that govern this schema also govern the formed schema, as specified by section 4.2.
39
39
40
40
## 4. The `data` and `optionalData` Keywords {#data-keyword}
41
41
42
-
### 4.1 Syntax and Semantics {#semantics}
42
+
### 4.1. Syntax and Semantics {#semantics}
43
43
44
44
The values of `data` and `optionalData` must be objects. The keys of these objects are interpreted as JSON Schema keywords, and the values MUST be one of
45
45
@@ -59,7 +59,7 @@ The values of `data` and `optionalData` must be objects. The keys of these obje
59
59
60
60
The validation and annotation results of `data` and `optionalData` are those of the formed schemas. More detail regarding output can be found in section 4.4.
61
61
62
-
### 4.2 Contextual Behavior {#behavior}
62
+
### 4.2. Contextual Behavior {#behavior}
63
63
64
64
`data` and `optionalData` MUST be processed contextually in the same manner as the host schema. Specifically,
65
65
@@ -71,7 +71,7 @@ Implementations SHOULD validate that the resolved data forms a valid schema agai
71
71
> It is not necessary for an implementation to validate the formed schema using the meta-schema. Other mechanisms internal to the implementation (such as deserialization) may suffice to perform this task.
72
72
{: .prompt-info }
73
73
74
-
### 4.3 Resolving data {#resolution}
74
+
### 4.3. Resolving data {#resolution}
75
75
76
76
The string values within `data` and `optionalData` are dereferenced in different ways depending on the format of the value.
77
77
@@ -85,29 +85,29 @@ Because JSON Pointers and Relative JSON Pointers are syntactically valid IRIs, t
85
85
86
86
For each successfully resolved reference, the full value at the specified location MUST be returned.
The `data` and `optionalData` keywords differ only in their behavior when resolving a reference fails.
91
91
92
92
For `data`, if a reference cannot be resolved, or if a resolved value is not valid for the associated keyword, evaluation MUST halt. Implementations SHOULD use native features of their language to report the failure as appropriate. Implementations MAY continue to attempt to resolve other references so that multiple resolution failures can be reported together, however further schema evaluation MUST NOT continue.
93
93
94
94
For `optionalData`, if a reference cannot be resolved, or if a resolved value is not valid for the associated keyword, that keyword MUST be ignored and excluded from the resulting formed schema. As a consequence, evaluation MUST proceed as if that keyword is absent.
95
95
96
-
#### 4.3.2 External Data Access {#external}
96
+
#### 4.3.2. External Data Access {#external}
97
97
98
98
Implementations SHOULD provide a means to pre-load and cache any external references prior to evaluation but MAY be configured to fetch external documents at evaluation time. Documents fetched from IRIs which contain a JSON Pointer fragment MUST be interpreted using a media type, such as `application/schema-instance+json`, that allows resolution of such fragments.
99
99
100
100
Users should be aware that fetching data from external locations may carry certain security risks not covered by this document.
101
101
102
-
### 4.4 Output {#output}
102
+
### 4.4. Output {#output}
103
103
104
104
The evaluation output of the formed schema is reported into the overall schema output incorporating "data" or "optionalData" into the evaluation path as appropriate and following on with additional pointer segments as navigable within the formed schema.
105
105
106
106
Annotation results of the formed schema are retained as per the host schema so that they can be processed by other keywords such as `unevaluatedItems` and `unevaluatedProperties`.
107
107
108
108
## 5. Examples {#examples}
109
109
110
-
### 5.1 `data` Example {#data-example}
110
+
### 5.1.`data` Example {#data-example}
111
111
112
112
The following defines a schema to validate an object instance with a `bar` property that must contain an numeric value less than or equal to the value in the instance's `foo` property.
113
113
@@ -144,7 +144,7 @@ The following shows how a change in the `foo` property, or its absence, can affe
144
144
{ "bar":20 }
145
145
```
146
146
147
-
### 5.2 `optionalData` Example {#optionalData-example}
147
+
### 5.2.`optionalData` Example {#optionalData-example}
148
148
149
149
In the following schema, `bar` is required to be less than `foo`, however `foo` itself is not required.
Copy file name to clipboardExpand all lines: _docs/schema/vocabs/vocabs-array-ext.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ title: A Vocabulary for Extended Validation of Arrays (WIP)
4
4
bookmark: Array Extensions
5
5
permalink: /schema/vocabs/array-ext/
6
6
icon: fas fa-tag
7
-
order: "01.8.3"
7
+
order: "01.8.4"
8
8
---
9
9
10
10
> This vocabulary is a work in progress. It is intended to deprecate and replace the existing [`uniqueKeys` vocabulary](/schema/vocabs/uniquekeys) by adding some more array-centric functionality. Comments, questions, and ideas are welcome as issues in the [main `json-everything` repository](https://github.com/gregsdennis/json-everything).
0 commit comments