-
Notifications
You must be signed in to change notification settings - Fork 65
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
validate
: add support for custom JSONSchema keyword dynenum
- allowing dynamic validation lookups against a CSV (remote, CKAN or local)
#1890
Comments
jsonschema
crate supports [custom keywords](https://github.com/Stranger6667/jsonschema-rs?tab=readme-ov-file#custom-keywords), I'm considering adding a dynlookup
keyword to allow validating a field against a CSV - with the CSV being either remote (http/s scheme supported) or in the local filesystem.validate
: add support for custom JSONSchema keyword dynlookup
- allowing validation lookups against a CSV (remote or local)
validate
: add support for custom JSONSchema keyword dynlookup
- allowing validation lookups against a CSV (remote or local)validate
: add support for custom JSONSchema keyword dynenum
- allowing dynamic validation lookups against a CSV (remote or local)
Call the custom keyword
It will be a one-column CSV, with optional display and description columns, i.e.:
The names of the column do not matter, it will just treat the first column as the value column, the second column as the display column, and the third column as the description column. The value column will be the one used for case-sensitive validation. If the CSV file is remote, it will be downloaded and cached in the If the JSONSchema Validation file is also remote, the |
…m keyword validator for expanded `validate` functionality, paving way for `dynenums` custom keyword see #1890
In addition, if the CSV is on a CKAN site, have the ability to search the site for the latest version of a package, similar to |
validate
: add support for custom JSONSchema keyword dynenum
- allowing dynamic validation lookups against a CSV (remote or local)validate
: add support for custom JSONSchema keyword dynenum
- allowing dynamic validation lookups against a CSV (remote, CKAN or local)
Now that the
jsonschema
crate supports custom keywords, I'm considering adding adynlookup
keyword to allow validating a field against a CSV - with the CSV being either remote (http/s scheme supported) or in the local filesystem.Though I'm sure we can have a full-blown
luau
script to do custom validation, it's not as convenient as JSONschema validation.WDYT?
Originally posted by @jqnatividad in #1872 (comment)
The text was updated successfully, but these errors were encountered: