8000 GitHub - hlminh2000/yup-to-json-schema: Convert Yup Schema to Json-Schema · GitHub
[go: up one dir, main page]

Skip to content

About

Convert Yup Schema to Json-Schema

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

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-schema

Usage

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);

About

Convert Yup Schema to Json-Schema

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0