Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Yup to jsonschema #25

Closed
diogommartins opened this issue Jun 11, 2019 · 2 comments
Closed

Question: Yup to jsonschema #25

diogommartins opened this issue Jun 11, 2019 · 2 comments

Comments

@diogommartins
Copy link

Hey Kristian,

Congrats on the great idea and project! I'm opening this issue because I'm also interested in doing the opposite, which is transforming a yup schema into a jsonschema. Do you think that would make sense and be possible to do so with schema-to-yup? Do you know any other projects that do that?

@kristianmandrup
Copy link
Owner

Hi @diogommartins,

Thanks. I've been working on a major refactoring of the library in the background, see mono-repo branch I believe.

Regarding your use case, I'm curious to know more about the background for it.
I think you would have to add a serializer to Yup directly and get in touch with the Yup library author. My library would not help much except as a reference for translation.

Cheers

@diogommartins
Copy link
Author

Hi @diogommartins,

Thanks. I've been working on a major refactoring of the library in the background, see mono-repo branch I believe.

Regarding your use case, I'm curious to know more about the background for it.
I think you would have to add a serializer to Yup directly and get in touch with the Yup library author. My library would not help much except as a reference for translation.

Cheers

I've got some schemas defined using yup that I use to validate the request contract of an API, and I wanted to use the same schema to auto-generate documentation. I'm able to do so with jsonschema and that's why I thought it would be a good idea to transform yup schemas into jsonschemas

Thanks a lot for your help =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants