-
Notifications
You must be signed in to change notification settings - Fork 8
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
First example auto-generated JSON schemas. #261
base: master
Are you sure you want to change the base?
Conversation
The web server https://jsonschema.net/#/editor was used to process captured JSON samples from Neal's smoketest work.
How does this kind of thing look, @ranweiler? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kiniry, this is great, and will be extremely helpful. One question: did you mean to commit server_test-pp.json
?
Those came out better than I would have expected. I like it, but I also think |
I'd love it if we added such schemas for all endpoints, and merged this in. |
We'll have to complete this PR in the coming week or two via the ongoing work in the |
What is the best way to get useful comments into the schema? E.g. we should document |
Indeed. I would argue that we should actually rename that particular attribute, too. |
I'd support renaming it. Easy to change it in main.py. I was going to suggest that, but didn't know how much work would be involved. |
After exploring this some more in the context of #845, Something more like genson (the powerful, user-friendly JSON Schema generator in Python: https://pypi.python.org/pypi/genson/ not Java genson) would seem more helpful. It makes it easier to document evolving schemas, since you can feed it as many schemas and objects as you want and it will spit out one, unified schema for them all. I found several of the answers and comments at Tool to generate JSON schema from JSON data - Stack Overflow to be useful. |
The web server https://jsonschema.net/#/editor was used to process
captured JSON samples from Neal's smoketest work.