Skip to content

jsonschema.RefResolver is deprecated #553

Closed

Description

@miettal

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!

Activity

  1. miettal commented on Jul 17, 2023

    @miettal
    Author

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

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

  2. peter-doggart commented on Jul 18, 2023

    @peter-doggart
    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.

  3. hbusul commented on Sep 7, 2023

    @hbusul
    Contributor

    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

  4. kannanprasanna commented on Dec 27, 2023

    @kannanprasanna

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

  5. peter-doggart commented on Jan 3, 2024

    @peter-doggart
    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.

  6. ske99ey commented on Jan 29, 2025

    @ske99ey

    Is there any idea as to when this will be resolved? Seems the above PR was opened but it basically failed all the test actions 😢

  7. golharam commented on Feb 12, 2025

    @golharam

    I'm seeing this too with the following configuration:

    Flask==3.1.0
    flask-restx==1.3.0
    jsonschema==4.23.0
    jsonschema-specifications==2024.10.1
    
  8. circulon commented on May 8, 2025

    @circulon

    I'm seeing it as well
    same as @golharam

    Any Idea when this might be addressed?

  9. dsrink commented on Aug 5, 2025

    @dsrink

    @peter-doggart It would be great to see some progress on this. I would also be willing to throw a few hours of work on this. Is there something I can do to help?

  10. vivodi commented on Sep 12, 2025

    @vivodi

    Any updates?

  11. peter-doggart commented on Sep 22, 2025

    @peter-doggart
    Contributor

    @ske99ey @golharam @circulon @dsrink @vivodi I've pushed a patch to a PR, a bit of extra handling is required to create the same schema in the new library: #639

    I will try and get it merged and released this week, but would be great if any of you guys could check it out to make sure it's all working?

  12. vivodi commented on Sep 23, 2025

    @vivodi

    I tested it, everything works fine.

  13. peter-doggart commented on Sep 23, 2025

    @peter-doggart
    Contributor

    @ske99ey @vivodi Thanks for confirming so quickly, much appreciated.

    I have merged everything and released v1.3.2 (not sure why the release pipeline decided all on its own to skip 1.3.1!). Please open a new issue and tag me if you find any problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions