Skip to content
This repository was archived by the owner on Mar 31, 2023. It is now read-only.

Convert Yup Schema to Json-Schema

License

Notifications You must be signed in to change notification settings

mr-yum/yup-to-json-schema

This branch is 33 commits behind sodaru/yup-to-json-schema:main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

606652f · Oct 15, 2022

History

6 Commits
Jan 21, 2021
Oct 15, 2022
Oct 15, 2022
Oct 14, 2022
Jan 21, 2021
Jan 21, 2021
Jan 21, 2021
Jan 21, 2021
Jan 20, 2021
Jan 21, 2021
Jan 21, 2021
Oct 15, 2022
Oct 15, 2022
Jan 21, 2021

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 97.0%
  • JavaScript 3.0%