Transforms a Draft 7 JSON Schema into a Yup validation schema. Current stable version is 1.6.12, with low release cadence. It supports most Draft 7 keywords including string formats (date-time, email, ipv4, etc.), numeric constraints, array items/tuples, and object properties. Differentiates from schema-to-yup by strictly adhering to the Draft 7 specification. Note: only supports yup v0.29.3 and below; newer yup versions may break.
npm install json-schema-yup-transformerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Converts a JSON Schema to a Yup schema and validates an object. Shows basic object property conversion and requirement handling.
Pin yup to v0.29.3: 'yup': '0.29.3'
Manually inline all definitions before passing the schema.
Avoid using boolean with enum or other keywords.
Downgrade to yup@0.29.3
Ensure root schema has 'type' property
Avoid using 'iri' or 'iri-reference' formats