-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Description
Hi, I am trying to generate models from openapi3 schema using BaseParser class.
It imports jsonschema's RefResolutionError, which is now showing deprecation warning.
I am using prance==23.6.21.0 and jsonschema==4.19.0
def _validate_openapi_spec_validator(
self, spec_version: Version
): # pragma: nocover
from openapi_spec_validator import validate_spec
from jsonschema.exceptions import ValidationError as JSEValidationError
from jsonschema.exceptions import RefResolutionError
Actual Behaviour
../../../../../.virtualenvs/my_proj/lib/python3.8/site-packages/prance/__init__.py:118: in __init__
self.parse()
../../../../../.virtualenvs/my_proj/lib/python3.8/site-packages/prance/__init__.py:148: in parse
self._validate()
../../../../../.virtualenvs/my_proj/lib/python3.8/site-packages/prance/__init__.py:187: in _validate
validator(parsed)
../../../../../.virtualenvs/my_proj/lib/python3.8/site-packages/prance/__init__.py:234: in _validate_openapi_spec_validator
from jsonschema.exceptions import RefResolutionError
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
name = 'RefResolutionError'
def __getattr__(name):
if name == "RefResolutionError":
> warnings.warn(
_RefResolutionError._DEPRECATION_MESSAGE,
DeprecationWarning,
stacklevel=2,
)
E DeprecationWarning: jsonschema.exceptions.RefResolutionError is deprecated as of version 4.18.0. If you wish to catch potential reference resolution errors, directly catch referencing.exceptions.Unresolvable.
Thanks in advance.
Environment
- OS: macOS 11.7.8
- Python version: 3.8.7
- Swagger/OpenAPI version used: 3.0.2
- Backend: openapi-spec-validator
John2013
Metadata
Metadata
Assignees
Labels
No labels