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

reification based on examples #15

Open
Benjmhart opened this issue Dec 30, 2021 · 0 comments
Open

reification based on examples #15

Benjmhart opened this issue Dec 30, 2021 · 0 comments

Comments

@Benjmhart
Copy link
Contributor

Would be great to automate the schema creation - even if it's crude at first, as a developer tool.

Admittedly, in many cases this may be an anti-pattern, however it can quickly aide in the creation of a schema - particularly when working with poorly documented API's, or when building parsers on one side of an integration, which must agree with an existing implementation.

Ideally i see this as a function [JSON] -> Schema, which can then be rendered out to a file.

Even if this is just the primitive assignments without any fancy string subtypes or other features, it should be reasonable to generate a schema which would fit all provided examples, Quickcheck could assist this process using existing Gen a -> [a] functions.

the rapid development advantages here could make this a great utility, even with appropriate warnings that the schema itself should be treated as the source of truth.

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

1 participant