Skip to content

This is used to convert a typescript interface or a json object to yup schema code

Notifications You must be signed in to change notification settings

harshgoel05/json-to-yup

Repository files navigation

Json-to-yup generator

Json-to-yup generator is an open-source project that streamlines the process of creating Yup validation schemas from TypeScript interfaces and JSON objects. Yup is a JavaScript schema validation library that helps you validate and sanitize data according to your defined schema.

  1. Converts JSON to yupyup schema code
  2. Converts typesctipt interfaces to yup schema code

Converting TypeScript interfaces or JSON objects into Yup validation schemas manually can be time-consuming and error-prone. Interface-to-Yup simplifies this process by automatically generating Yup schemas based on your input interfaces or JSON objects, saving you valuable development time and reducing the chances of introducing bugs in your validation logic.

Known limitations:

  1. Doesn't support nested objects
  2. Needs a valid input
  3. Works on a single JSON/Interface

View it live at: http://interface-to-yup.harshgoel.me

Local Setup

First, Install Dependencies:

yarn

Then, run the development server:

yarn dev

Contributing

We welcome contributions from the open-source community! If you'd like to contribute to Interface-to-Yup, please refer to our contribution guidelines for more information on how to get started.

License

Interface-to-Yup is released under the MIT License.

About

This is used to convert a typescript interface or a json object to yup schema code

Topics

Resources

Stars

Watchers

Forks