Skip to content

Commit

Permalink
docs: update
Browse files Browse the repository at this point in the history
  • Loading branch information
sagold committed Apr 7, 2024
1 parent f9ac4a3 commit f62b340
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,23 @@ const errors: JsonError[] = jsonSchema.validate(myData);

What follows is a description of the main draft methods.


## Draft support

`json-schema-library` supports almost all draft features. This sections lists currently unsupported features for each draft

<details><summary>Draft 2019-09</summary>

**Currently unsupported core features:**

- `$recursiveRef` and `$recursiveAnchor` - are currently not supported
- `$vocabulary` - meta-schemas are not parsed for enabled features
- `unevaluatedItems: uncle-schema` - evaluation of uncle-schemas is not supported. Properties will be return as evaluated
- `unevaluatedProperties: uncle-schema` - evaluation of uncle-schemas is not supported. Properties will be return as evaluated

</details>


## Draft methods

- [validate](#validate)
Expand Down
10 changes: 6 additions & 4 deletions lib/draft06/compile/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,12 @@ type Context = {
};

/**
* @draft starting with _draft 2019-09_ plain name fragments are no longer
* defined with $id, but instead with the new keyword $anchor
* (which has a different syntax)
* https://json-schema.org/draft/2019-09/release-notes#incompatible-changes
* @draft 6, 2019-09
* - starting with _draft 2019-09_ plain name fragments are no longer defined with $id,
* but instead with the new keyword $anchor (which has a different syntax)
* https://json-schema.org/draft/2019-09/release-notes#incompatible-changes
* - in _draft 2019-09_ only $recursiveAnchor and $recursiveRef have been introduced
* - starting with _draft 6_ id is named $id
*
* compiles the input root schema for $ref resolution and returns it again
* @attention this modifies input schema but maintains object-structure
Expand Down

0 comments on commit f62b340

Please sign in to comment.