Skip to content

Commit 91fa99d

Browse files
authored
Add draft 2019-09 to readme (#33)
1 parent aa70033 commit 91fa99d

File tree

1 file changed

+59
-2
lines changed

1 file changed

+59
-2
lines changed

README.md

+59-2
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,10 @@ val valid = schema.validate(elementToValidate, errors::add)
124124
## Supported JSON schema drafts:
125125

126126
- [Draft 7](https://json-schema.org/specification-links.html#draft-7)
127-
- Keywords
127+
<details>
128+
<summary>Supported keywords</summary>
129+
130+
- Core
128131

129132
| Keyword | Status |
130133
|:------------|:----------------------------------------------------------------------------------------------------|
@@ -166,6 +169,60 @@ val valid = schema.validate(elementToValidate, errors::add)
166169
| | anyOf | Supported (all validation will be executed even if the element matches the first one) |
167170
| | oneOf | Supported |
168171
| | not | Supported |
172+
</details>
173+
- [Draft 2019-09](https://json-schema.org/specification-links#draft-2019-09-(formerly-known-as-draft-8))
174+
<details>
175+
<summary>Supported keywords</summary>
176+
177+
- Core
178+
179+
| Keyword | Status |
180+
|:------------------|:----------------------------------------------------------------------------------------------------|
181+
| $id | Supported. $id in sub-schemas are collected as well and can be used in $ref |
182+
| $schema | Supported. Validates if schema is one of the supported schemas. The last supported is used if empty |
183+
| $ref | Supported (except references to schemas from another document) |
184+
| $recursiveRef | Supported (does not work yet to extend schemas from other documents) |
185+
| $defs/definitions | Supported. Definitions are loaded and can be referenced |
186+
187+
- Assertions
188+
189+
| Category | Assertion | Status |
190+
|:--------------|:----------------------|:------------------------------------------------------------------------------------------------------------------------------------------------|
191+
| General | type | Supported all type [defined in the specification](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.1.1) |
192+
| | enum | Supported |
193+
| | const | Supported |
194+
| Numbers | multipleOf | Supported |
195+
| | maximum | Supported |
196+
| | exclusiveMaximum | Supported |
197+
| | minimum | Supported |
198+
| | exclusiveMinimum | Supported |
199+
| Strings | maxLength | Supported |
200+
| | minLength | Supported |
201+
| | pattern | Supported (kotlin.text.Regex is used) |
202+
| Arrays | items | Supported |
203+
| | additionalItems | Supported |
204+
| | unevaluatedItems | Supported |
205+
| | maxItems | Supported |
206+
| | uniqueItems | Supported |
207+
| | contains | Supported |
208+
| | minContains | Supported (does not affect the work of contains assertion anyhow even if minContains=0) |
209+
| | maxContains | Supported |
210+
| Objects | maxProperties | Supported |
211+
| | minProperties | Supported |
212+
| | required | Supported |
213+
| | properties | Supported |
214+
| | patternProperties | Supported (kotlin.text.Regex is used) |
215+
| | additionalProperties | Supported |
216+
| | unevaluatedProperties | Supported |
217+
| | dependentRequired | Supported |
218+
| | dependentSchemas | Supported |
219+
| | propertyNames | Supported |
220+
| Conditions | if/then/else | Supported |
221+
| Boolean logic | allOf | Supported |
222+
| | anyOf | Supported (all validation will be executed even if the element matches the first one) |
223+
| | oneOf | Supported |
224+
| | not | Supported |
225+
</details>
169226

170227
## Compliance to JSON schema test suites
171228

@@ -179,6 +236,6 @@ The test are located [here](test-suites).
179236
- [x] Add `$schema` property validation (if not set the latest supported will be used)
180237
- [x] Add proper `$id` support (for nested schemas and for referencing)
181238
- [ ] Add support for newer drafts
182-
- [ ] [Draft 2019-09 (Draft 8)](https://json-schema.org/specification-links.html#draft-2019-09-formerly-known-as-draft-8)
239+
- [x] [Draft 2019-09 (Draft 8)](https://json-schema.org/specification-links.html#draft-2019-09-formerly-known-as-draft-8)
183240
- [ ] [2020-12](https://json-schema.org/specification-links.html#2020-12)
184241
- [ ] Formalize error output as it is defined in the latest drafts (have not fully decided if it should be done)

0 commit comments

Comments
 (0)