@@ -65,6 +65,57 @@ widely used, while draft-03 is long since deprecated.
65
65
If you see anything missing from the current supported drafts, or incorrect
66
66
on any draft still accepting bug fixes, please file an issue or submit a PR.
67
67
68
+ Optional Tests
69
+ --------------
70
+
71
+ Tests in the ` optional/ ` directory test optional validation behavior. Validators
72
+ only need to execute tests for implemented features.
73
+
74
+ There are different sets of optional features for each draft. They are
75
+ summarized below.
76
+
77
+ 1 . Arbitrary-precision number support: JSON allows numbers of
78
+ arbitrary precision.\
79
+ See: [ 6. Numbers] ( https://tools.ietf.org/html/rfc8259#section-6 ) \
80
+ Also see:
81
+ * 2019-09: [ 4.2. Validation of Numeric Instances] ( https://json-schema.org/draft/2019-09/json-schema-validation.html#rfc.section.4.2 )
82
+ * 7: [ 4.2. Validation of Numeric Instances] ( https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-4.2 )
83
+ * 6: [ 3.2. Validation of numeric instances] ( https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-3.2 )
84
+ * 4: [ 3.2. Validation of numeric instances] ( https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-3.2 )
85
+ * 3: No link
86
+ 2 . Encoded content in a string: The ` "contentMediaType" ` property is optional.\
87
+ See:
88
+ * 2019-09: [ 8.4. contentMediaType] ( https://json-schema.org/draft/2019-09/json-schema-validation.html#rfc.section.8.4 )
89
+ * 7: [ 8.4. contentMediaType] ( https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-8.4 )
90
+ 3 . ECMA 262 regex quirks.\
91
+ See:
92
+ * 2019-09: [ 6.4. Regular Expressions] ( https://json-schema.org/draft/2019-09/json-schema-core.html#rfc.section.6.4 )
93
+ * 7: [ 4.3. Regular Expressions] ( https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-4.3 )
94
+ * 6: [ 3.3. Regular expressions] ( https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-3.3 )
95
+ * 4: [ 3.3. Regular expressions] ( https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-3.3 )
96
+ * 3: https://tools.ietf.org/html/draft-zyp-json-schema-03 (look for the term
97
+ "regular expression")
98
+ 4 . References to unknown keywords: These may optionally be processed.\
99
+ See:
100
+ * 2019-09: [ 6.5. Extending JSON Schema] ( https://json-schema.org/draft/2019-09/json-schema-core.html#rfc.section.6.5 )
101
+ * 7: [ 6.4. Extending JSON Schema] ( https://tools.ietf.org/html/draft-handrews-json-schema-01#section-6.4 )
102
+ * 6: [ 6.4. Extending JSON Schema] ( https://tools.ietf.org/html/draft-wright-json-schema-01#section-6.4 )
103
+ * 4: [ 5.6. Extending JSON Schema] ( https://tools.ietf.org/html/draft-zyp-json-schema-04#section-5.6 )
104
+ * 3: [ 5.4. additionalProperties] ( https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.4 )
105
+ 5 . Numbers having zero-valued fractional parts are integers: In the JSON data
106
+ model, there is no distinction made between integers and arbitrary numbers.
107
+ Some parsers, however, may not support floating-point, or even choose to
108
+ make a distinction between integers and numbers having a zero-valued
109
+ fractional part.\
110
+ See: [ 6. Numbers] ( https://tools.ietf.org/html/rfc8259#section-6 )
111
+ 6 . All the defined "format" values.\
112
+ See:
113
+ * 2019-09: [ 7. A Vocabulary for Semantic Content With "format"] ( https://json-schema.org/draft/2019-09/json-schema-validation.html#rfc.section.7 )
114
+ * 7: [ 7. Semantic Validation With "format"] ( https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-7 )
115
+ * 6: [ 8. Semantic validation with "format"] ( https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-8 )
116
+ * 4: [ 7. Semantic validation with "format"] ( https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-7 )
117
+ * 3: [ 5.23. format] ( https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.23 )
118
+
68
119
Who Uses the Test Suite
69
120
-----------------------
70
121
0 commit comments