jsonschema-draft4 v1.0.0 provides a verbatim copy of the JSON Schema Draft 4 meta-schema as published at json-schema.org/draft-04/schema. This package is a single-file module that exports the schema object for use in validation or reference. It is not regularly updated as it represents a frozen specification. Differentiators: it is the canonical Draft 4 schema, not a validator or generator. It has no dependencies and is compatible with both CommonJS and ES modules.
npm install jsonschema-draft4No compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Imports the Draft 4 meta-schema object and uses it with a validator (example with Ajv).
Use a more recent JSON Schema version (e.g., draft-07 or 2020-12) via packages like @apidevtools/json-schema-ref-parser or ajv-formats.
When using Ajv, enable strict mode: new Ajv({ strict: false }). Or use the schema as a reference without self-validation.Add a declaration file: declare module 'jsonschema-draft4' { const schema: object; export default schema; }npm install jsonschema-draft4
Use the schema object for validation reference, not as a function.
Set the validator's meta option to false or use a schema ID that allows $schema.
No dependency data recorded yet.