-
Notifications
You must be signed in to change notification settings - Fork 0
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
Translate marshmallow schema to jsonschema #2
Comments
I set up a |
@smcalilly This is the next issue on deck. I talk a lot about CI, but the first step is actually to translate the marshmallow schema to jsonschema. As stated in the description, the I'd like to review a draft once you've drafted the Python script a written a brief inventory (a bulleted list is fine) of any validation that isn't automatically translated from marshmallow to jsonschema. Any questions up front? |
I've added a basic script to the branch called It didn't convert any of the validation decorators. There is custom validation for these fields:
It appears that the Some solutions/questions/brainstorming:
|
A couple of notes ahead of our chat:
Look forward to hearing more from you about the other bullet points in your comment, which I'm not familiar with. |
I think this documentation has good examples of requiring fields based on the value of another field: https://react-jsonschema-form.readthedocs.io/en/latest/usage/dependencies/ |
Another good thread for conditional requirements: https://stackoverflow.com/questions/38717933/jsonschema-attribute-conditionally-required |
@smcalilly The next step here is to replace the Then, you should do some test uploads locally to confirm it's working as expected and, if not, address any problems that shake out. Any immediate questions? |
No questions. I'm working on this. The script setup is useful! Finding/working through some problems with the schema validation. |
The first draft of this is done, as of #15! We have issues open to address outstanding bugs, so I'm going to close this. |
Define a script using the marshmallow-jsonschema library to create a
jsonschema
from the marshmallow schema.It would be pretty cool for this step to happen automatically so the
jsonschema
is always in sync with the marshmallow schema. Consider programmatically running the script as a build step in GitHub Actions.Some potential candidate Actions for this behavior:
git-auto-commit
add-commit
The text was updated successfully, but these errors were encountered: