Package Exports
- @sodaru/yup-to-json-schema
- @sodaru/yup-to-json-schema/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@sodaru/yup-to-json-schema) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
yup-to-json-schema
Yup is a library to validate the JSON input
JSON-Schema is a schema specification for JSON
This library converts Yup schema to JSON-Schema
Installation
npm i @sodaru/yup-to-json-schemaUsage
import yupToJsonSchema from "@sodaru/yup-to-json-schema"
// see Yup Specification for more options to create yupSchema
const yupSchema = object({
name: string()
}).required();
const jsonSchema = yupToJsonSchema(yupSchema);Contribution
Fork the repo and send the Pull Requests to develop branch
develop is merged to the main branch periodically to make a release
Support
This project is a part of the Open Source Initiative from Sodaru Technologies
Write an email to opensource@sodaru.com for queries on this project