Skip to content

Commit 76fed0f

Browse files
committed
Update readme
1 parent dff6365 commit 76fed0f

File tree

1 file changed

+58
-2
lines changed

1 file changed

+58
-2
lines changed

README.md

Lines changed: 58 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,59 @@ val valid = schema.validate(elementToValidate, errors::add)
223223
| | oneOf | Supported |
224224
| | not | Supported |
225225
</details>
226+
- [Draft 2020-12](https://json-schema.org/specification-links#2020-12)
227+
<details>
228+
<summary>Supported keywords</summary>
229+
230+
- Core
231+
232+
| Keyword | Status |
233+
|:---------------------------|:----------------------------------------------------------------------------------------------------|
234+
| $id | Supported. $id in sub-schemas are collected as well and can be used in $ref |
235+
| $schema | Supported. Validates if schema is one of the supported schemas. The last supported is used if empty |
236+
| $ref | Supported (except references to schemas from another document) |
237+
| $dynamicRef/$dynamicAnchor | Supported (does not work yet to extend schemas from other documents) |
238+
| $defs/definitions | Supported. Definitions are loaded and can be referenced |
239+
240+
- Assertions
241+
242+
| Category | Assertion | Status |
243+
|:--------------|:----------------------|:------------------------------------------------------------------------------------------------------------------------------------------------|
244+
| 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) |
245+
| | enum | Supported |
246+
| | const | Supported |
247+
| Numbers | multipleOf | Supported |
248+
| | maximum | Supported |
249+
| | exclusiveMaximum | Supported |
250+
| | minimum | Supported |
251+
| | exclusiveMinimum | Supported |
252+
| Strings | maxLength | Supported |
253+
| | minLength | Supported |
254+
| | pattern | Supported (kotlin.text.Regex is used) |
255+
| Arrays | prefixItems | Supported |
256+
| | items | Supported |
257+
| | unevaluatedItems | Supported |
258+
| | maxItems | Supported |
259+
| | uniqueItems | Supported |
260+
| | contains | Supported |
261+
| | minContains | Supported |
262+
| | maxContains | Supported |
263+
| Objects | maxProperties | Supported |
264+
| | minProperties | Supported |
265+
| | required | Supported |
266+
| | properties | Supported |
267+
| | patternProperties | Supported (kotlin.text.Regex is used) |
268+
| | additionalProperties | Supported |
269+
| | unevaluatedProperties | Supported |
270+
| | dependentRequired | Supported |
271+
| | dependentSchemas | Supported |
272+
| | propertyNames | Supported |
273+
| Conditions | if/then/else | Supported |
274+
| Boolean logic | allOf | Supported |
275+
| | anyOf | Supported (all validation will be executed even if the element matches the first one) |
276+
| | oneOf | Supported |
277+
| | not | Supported |
278+
</details>
226279

227280
## Compliance to JSON schema test suites
228281

@@ -235,7 +288,10 @@ The test are located [here](test-suites).
235288

236289
- [x] Add `$schema` property validation (if not set the latest supported will be used)
237290
- [x] Add proper `$id` support (for nested schemas and for referencing)
238-
- [ ] Add support for newer drafts
291+
- [x] Add support for newer drafts
239292
- [x] [Draft 2019-09 (Draft 8)](https://json-schema.org/specification-links.html#draft-2019-09-formerly-known-as-draft-8)
240-
- [ ] [2020-12](https://json-schema.org/specification-links.html#2020-12)
293+
- [x] [2020-12](https://json-schema.org/specification-links.html#2020-12)
294+
- [ ] Add support for schemas from external documents
295+
- [ ] Load schemas from local sources
296+
- [ ] Load schemas from remote sources
241297
- [ ] 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)