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.
- Converts JSON to yupyup schema code
- 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:
- Doesn't support nested objects
- Needs a valid input
- Works on a single JSON/Interface
View it live at: http://interface-to-yup.harshgoel.me
First, Install Dependencies:
yarn
Then, run the development server:
yarn dev
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.
Interface-to-Yup is released under the MIT License.