From 689311f30b20f32d2c4ad6844933ddae83437979 Mon Sep 17 00:00:00 2001 From: Sascha Goldhofer Date: Fri, 28 Jun 2024 11:32:39 +0200 Subject: [PATCH] docs: note on readme of v10 and v9 --- README.md | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 71fd393..7f2b183 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,8 @@ draft methods | draft extensions | draft customization | breaking changes

+> ⚠️ This documentation refers to the upcoming release version 10, which can be insalled by `npm install json-schema-library@10.0.0-rc1`. For the latest release please refer to the [documentation of version 9.3.5](https://github.com/sagold/json-schema-library/tree/v9.3.5) + **install** `yarn add json-schema-library` @@ -35,7 +37,6 @@ 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 @@ -44,13 +45,12 @@ What follows is a description of the main draft methods. **Currently unsupported core features:** -- `$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 +- `$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 - ## Draft methods - [validate](#validate) @@ -309,7 +309,6 @@ expect(myData).to.deep.equal([]); - ### each `each` iterates over each data-item (_object_, _array_ and _value_) and emits the data-item, schema and location to a callback. @@ -1006,8 +1005,7 @@ With version `v10.0.0` _draft 2019-09_ is supported and can be used with `import _Draft 2019-09_ requires collection of previous resolved sub-schemas. Thus, an additional type `SchemaNode` had to be introduced, which is used in almost all draft methods defined for draft-configs. The api in draft-instances mostly stayed the same with the following exceptions: -- `step` and resolvers work on and return a `schemaNode`, containing the requested schema - +- `step` and resolvers work on and return a `schemaNode`, containing the requested schema ### v9.0.0 @@ -1020,7 +1018,6 @@ _Draft 2019-09_ requires collection of previous resolved sub-schemas. Thus, an a - _getSchema_ consistently returns errors and can return errors for empty schema using `withSchemaWarning` option - ### v8.0.0 With version `v8.0.0`, _getTemplate_ was improved to better support optional properties and utilize existing core logic, making it more reliable. Breaking changes: @@ -1040,7 +1037,6 @@ With version `v8.0.0`, _getTemplate_ was improved to better support optional pro - ### v7.0.0 With version `v7.0.0`, library export and Draft API has changed heavily. The API is now more consistent across draft-versions and offers a simple and consistent configuration interface for existing and custom drafts. In addition, most standalone functions are no longer exposed separately, but under its current _draftConfigs_ and mainly on each draft-instance. This will help to reduce confusion when consuming this API. @@ -1060,17 +1056,14 @@ The above documentation reflects all these changes. Just reach out if you have t - ### v6.0.0 With version `v6.0.0` supported json schema drafts are exported directly as `Draft04`, `Draft06`, `Draft07`. Example use: `import { Draft07 } from "json-schema-library"`. - ### v5.0.0 With version `v5.0.0` the API has changed to es6 modules, where there is no `default` export, only named exports. Additionally all code has been rewritten in TypeScript. When directly accessing files, switch to `dist/module/*.js`-files for plain js-modules. - ### v4.0.0 With version `v4.0.0` the API has changed in order to use the defined (root) schema in draft as default where possible. This means most methods have a changed signature, where `data` is passed before an optional `schema` argument.