python-restx / flask-restx

Fork of Flask-RESTPlus: Fully featured framework for fast, easy and documented API development with Flask
https://flask-restx.readthedocs.io/en/latest/
Other
2.16k stars 335 forks source link

jsonschema.RefResolver is deprecated #553

Open miettal opened 1 year ago

miettal commented 1 year ago

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

Additional Context

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

miettal commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 10 months ago

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

peter-doggart commented 10 months ago

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.