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

Try substituting jsonschema-rs for jsonschema #123

Open
jpmckinney opened this issue Oct 2, 2024 · 1 comment
Open

Try substituting jsonschema-rs for jsonschema #123

jpmckinney opened this issue Oct 2, 2024 · 1 comment

Comments

@jpmckinney
Copy link
Member

jpmckinney commented Oct 2, 2024

https://github.com/Stranger6667/jsonschema-rs/tree/master/crates/jsonschema-py is designed to be API-compatible with jsonschema.

If it is truly impossible to switch to jsonschema-rs, I can try using Scalene to find performance improvements in jsonschema.

@jpmckinney
Copy link
Member Author

jsonschema 4.22.0 has the promising changelog entry:

Improve best_match (and thereby error messages from jsonschema.validate) in cases where there are multiple sibling errors from applying anyOf / allOf -- i.e. when multiple elements of a JSON array have errors, we now do prefer showing errors from earlier elements rather than simply showing an error for the full array (#1250).

However, these are still not as friendly as we currently make them. That is, jsonschema errors still look like "is not valid under any of the given schemas" instead of "'date' is missing but required within 'releases'"

@jpmckinney jpmckinney transferred this issue from open-contracting/cove-ocds Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant