sphinx-contrib / openapi

OpenAPI (fka Swagger) spec renderer for Sphinx.
https://sphinxcontrib-openapi.readthedocs.io
BSD 2-Clause "Simplified" License
110 stars 80 forks source link

jsonschema deprecation warning #154

Open juliangilbey opened 6 months ago

juliangilbey commented 6 months ago

Running the tests using jsonschema version 4.19.2, I received the following warning:

../../../../../usr/lib/python3/dist-packages/sphinxcontrib/openapi/utils.py:27
  /usr/lib/python3/dist-packages/sphinxcontrib/openapi/utils.py:27: 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.
    class OpenApiRefResolver(jsonschema.RefResolver):

So utils.py should be updated at some point, probably in the not-too-distant future.

[EDIT: manually wrapped the long warning message to avoid having to scroll as far]