-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
Roadmap #566
Comments
I presently use python-jsonschema, where I use custom resolvers for a few reasons:
It would be really nice to be able to control (1). For (2), would a workaround be to provide only dereferenced schema to jsonschema_rs? |
Hey @jpmckinney Thank you for bringing this up!
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a somewhat detailed roadmap for the development of this crate as I'd like to be transparent about what changes the user may anticipate. I will update it roughly once a month with all the main milestones.
Right now the current version is
0.26.0
. This plan is not set in store and some other features could be implemented outside of these milestones (e.g. regex config support, or moving some dependencies behind features).Full JSON Schema support - DONE 🎉
Missing non-optional test cases:
unevaluatedItems
($ref
,$recursiveRef
&$dynamicRef
support)vocabulary
unevaluatedProperties
($ref
ordering issue)$ref
in Draft 2019-09Some optional will be resolved along with the ones above, however, some
bignum
tests for Draft 4 depend on parsing numbers with arbitrary precision which I plan to address later.UPDATE 2024-10-12: Most of the
unevaluatedItems
keyword logic is implemented and only referencing support is left.UPDATE 2024-10-20: Vocabulary support is done, now there are only 3 required tests not passing. These are bugs in the current implementation, so I'd consider support of Drafts 2019-09 & 2020-12 as done and will fix those cases later on.
UPDATE 2024-10-24: Finished the last few remaining cases.
Better errors
The main issue with errors is that
validate
returns an iterator, but I'd rather havevalidate
+iter_errors
where the former returnsResult<(), ValidationError>
As the end goal the errors should:
I'd also think about separating schema & instance errors.
It would be nice to rework the error iterator, so it is bound to the validator instance (as it uses its sub-validators). There are some performance issues I'd like to fix, i.e. collecting errors into vectors during validation.
UPDATE 2024-10-26: The older
validate
version is replaced withvalidate
+iter_errors
Non-blocking resolving
Right now, the resolving of external references happens during the building phase, which makes it relatively straightforward to implement non-blocking resolving (actually, I'd like to retrieve resources in batches rather than sequentially too).
Along with this change, I'd like to expose custom resolvers to Python bindings + hopefully with async too, but not 100% sure about this.
Output formats
Adopt naming from the "next" draft + implement a hierarchical style. At this point, I want to separate all the annotation storage from the main graph, as it implies overhead for
is_valid
andvalidate
.Rework Python bindings
For a long time, I wanted to implement generic JSON input, I'll try to work on it at this stage. In Python bindings, sometimes the overhead data (de)-serialization during building a validator / validation is up to 80%, having generic input will greatly speed up everything.
Arbitrary precision also goes here, I'd like to have it behind a flag, so it could be disabled by default, but enabled in Python bindings.
WASM
It should "just work", maybe except for filesystem resolving, but network stuff could work via web_sys (I've tried it in
css-inline
).Performance, performance, performance
I have tons of ideas about it as my main use case is to speed up the generation of instances that match a schema (in
hypothesis-jsonschema
&schemathesis
), hence I am going to focus on theis_valid
performance because the exact errors don't matter in this case.The text was updated successfully, but these errors were encountered: