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

jsonschema.RefResolver is deprecated #553

Open
miettal opened this issue Jul 17, 2023 · 5 comments · May be fixed by #592
Open

jsonschema.RefResolver is deprecated #553

miettal opened this issue Jul 17, 2023 · 5 comments · May be fixed by #592
Labels
bug Something isn't working

Comments

@miettal
Copy link

miettal commented Jul 17, 2023

Code

import flask_restx

Expected Behavior

no error

Actual Behavior

output below warning.

E   DeprecationWarning: jsonschema.RefResolver is deprecated as of v4.18.0, in favor of the https://github.com/python-jsonschema/referencing library, which provides more compliant referencing behavior as well as more flexible APIs for customization. A future release will remove RefResolver. Please file a feature request (on referencing) if you are missing an API for the kind of customization you need.

Environment

  • python 3.11
  • Flask==2.3.2
  • flask-restx==1.1.0
  • jsonschema==4.18.3

Additional Context

This is your last chance to provide any pertinent details, don't let this opportunity pass you by!

@miettal miettal added the bug Something isn't working label Jul 17, 2023
@miettal
Copy link
Author

miettal commented Jul 17, 2023

it seems jsonschema reference resolving function is sepalated from jsonschema package.
currently the function provided by referencing package.

https://github.com/python-jsonschema/referencing

@peter-doggart
Copy link
Contributor

Thanks for the heads-up. Will likely have to fix jsonscheme==4.17.3 until I can investigate the changes required to move to the new package.

@hbusul
Copy link
Contributor

hbusul commented Sep 7, 2023

If no-one started working on this, I can start working on this. But I do not know how much time I can dedicate to this

@kannanprasanna
Copy link

@peter-doggart , could you please let us know if this issue will be addressed in any of the upcoming releases?

@peter-doggart
Copy link
Contributor

Yes, it will be. I just haven't had an opportunity to dig into it yet. The primary issue is that flask-restx generates swagger 2.0 type docs that require JSON types compatible with JSON-Schema Draft 4, which is really, really old now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
4 participants