@korzio/djv-draft-04

2.0.1 • Public • Published

Build Status Join the chat at https://gitter.im/korzio/djv

@korzio/djv-draft-04

Dynamic JSON-Schema Validator Plugin to support draft-04 version of JSON-Schema specification.

Currently the djv package supports JSON-Schema v6 and v4. Since version 2.0.0 it uses v6 by default. @korzio/djv-draft-04 package intent is to provide support for v4 for the djv package.

Please check the main package documentation.

Version of the plugin is syncronized with the djv, as any major change in the main repo should point to plugin upgrade.

Table of contents

Install

npm install @korzio/djv-draft-04

or

<script src="@korzio/djv-draft-04.js"></script>

Usage

To use the v4 directly in the djv package specify version option when creating environment.

const env = new djv({ version: 'draft-04' });

It is also possible to use useVersion method.

env.useVersion('draft-04');

The djv will require draft-04 plugin implicitly. Be careful as once the environment is modified, it will not be able to validate different versions of JSON-Schema.

References

Package Sidebar

Install

npm i @korzio/djv-draft-04

Weekly Downloads

49,613

Version

2.0.1

License

MIT

Unpacked Size

10 kB

Total Files

7

Last publish

Collaborators

  • korzio