A JSON Schema validator and linter built on
@hyperjump/browser and
unified.
- Dialects: v1, draft-2020-12, draft-2019-09, draft-07, draft-06, and
draft-04. OpenAPI is
@hyperjump/openapi. - Get a boolean, errors, or annotations, for a plain JS value, JSON text, or a JSON AST. See Validating.
- With JSON text, every error has a position, and syntax errors are reported with validation errors
- Annotations come back as an AST with annotations on its nodes
- Schemas from
http(s):,file:, or in-memory registries - Lint schemas to find likely mistakes in schemas, with a recommended preset.
- Custom keywords, formats, dialects, vocabularies, output formats, linter rules, and evaluation plugins
Status: Experimental and unpublished. It depends on unreleased versions of
@hyperjump/browser (v2) and @hyperjump/uri. The API will change. See
the design docs for the decisions made so far.
npm install @hyperjump/json-schemaThe documentation is in website/. Start with
Getting started.
Run the tests
npm testRun the tests with a continuous test runner
npm test -- --watchLint and type-check
npm run lint
npm run type-checkThe design docs, specs, principles, and style guide are in
design/.