-
-
Notifications
You must be signed in to change notification settings - Fork 98
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
Add a ValidationOptions::with_registry
method
#682
Comments
Hi @rayokota Thank you for opening this issue! Yes, it is something I plan to do |
Right now there are Would it be enough for your use case if they are exposed via Python bindings? at least in the first iteration. There are a few things I'd like to resolve with registries before exposing them via the |
Thanks for looking into this @Stranger6667 , I really appreciate it. Yes, I could use the |
Sure thing! I am happy to learn more about your use case! To clarify, your main use case is still in Python, right? If so, then it looks like Could you share some code you are porting? It will help me to have a better overview of what could be done here to enable this use case for you. |
Actually, my use case is I am porting Python code to pure Rust code. So the new Rust code will not rely on any of the old Python code. More specifically, I am creating a pure Rust client that can talk to Confluent Schema Registry. I am porting a Python client that has these lines In my Rust code, I have a So the use case is entirely in Rust (but mimics the Python code). I'm happy to answer any questions to clarify the use case. Thanks! |
I was looking at the Python implementation, and I think that in order to support which relies on a |
Thank you for the context! I added a straightforward implementation in #685 which is quite inefficient but works. Let me know if that is sufficient I'll add some changes to Python bindings too and will make a release. Later I plan to rework the internals of |
Yes, this works for me. Thanks again @Stranger6667 ! :) |
I’ve spent some more time looking at it and made some progress with registry refactoring I wanted to do. It will take some more time but I’ll ship it together with the interface we discussed and some nice performance improvements for registries specifically (much fewer subtree clones during processing) Also there will be some unsafe and I need to audit it better and add Miri to CI, however, the approach should work (it was suggested by jonhoo some time ago at a conference, so I have some more confidence that it is the most performant way to make it work) |
Hi, thanks for this library. I'm currently porting some code that uses the Python jsonschema package. I already have a
Registry
instance in hand and in Python I'm using the followingvalidate
method:Would it be possible for this library to add a corresponding
ValidationOptions::with_registry
method to match the ability to pass a pre-builtRegistry
instance to the validator?The text was updated successfully, but these errors were encountered: