-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Can pass a JSON schema to DictParameter and ListParameter #3217
Conversation
Note that this PR adds the |
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.
This is a great addition!
However, I'm leaning towards suggesting jsonschema
be an optional installation since this is an optional feature usage.
Cool, thanks! |
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.
Thanks!
With pleasure :) |
Description
Add an optional parameter to
DictParameter
andListParameter
so the loaded value can be validated against a JSON schema.Motivation and Context
Adding a simple validation step reduces the amount of code in the
run
method of the tasks. Also, the arguments are checked at the beginning of the workflow so it fails faster, which is always better than failing during the workflow.Have you tested this? If so, how?
I added simple tests.