This package contains TypeScript definitions for JSON Schema. It may be useful in all kind of TypeScript projects that work with JSON Schema directly.
Supported JSON Schema drafts:
Install the definitions:
npm install @fosfad/json-schema-typescript-definitionsImport JsonSchema type definition:
import { JsonSchema } from '@fosfad/json-schema-typescript-definitions/2020-12';The package exports 3 types: JsonSchemaBoolean, JsonSchemaObject and JsonSchema:
- JsonSchemaBooleanstands for Boolean JSON Schema;
- JsonSchemaObjectis an object with all possible JSON Schema keywords within;
- JsonSchemais a union type between- JsonSchemaBooleanand- JsonSchemaObject.