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

openapi_spec_validator hands on create_spec on jsonschema 4.0.1 #131

Open
adammkelly opened this issue Oct 1, 2021 · 1 comment
Open

Comments

@adammkelly
Copy link
Contributor

The code appears to enter into a recursive loop within jsonschema 4.0.1, a work around for now is reverting back to jsonschema 3.2.0 and the hang no longer happens.

`Package Version


apispec 5.1.1
apispec-oneofschema 3.0.0
asserts 0.11.1
attrs 21.2.0
azure-common 1.1.27
azure-core 1.19.0
azure-identity 1.6.1
azure-keyvault-secrets 4.3.0
backcall 0.2.0
bandit 1.7.0
certifi 2021.5.30
cffi 1.14.6
charset-normalizer 2.0.6
cryptography 35.0.0
decorator 5.1.0
dictpath 0.1.3
dnspython 1.16.0
eventlet 0.30.2
falcon 2.0.0
falcon-apispec 0.4.0
falcon-swagger-ui 1.2.1
flake8 3.9.2
flake8-broken-line 0.3.0
flake8-bugbear 21.9.2
flake8-debugger 4.0.0
flake8-polyfill 1.0.2
flake8-tidy-imports 4.4.1
gitdb 4.0.7
GitPython 3.1.24
goals-app 0.1
greenlet 1.1.2
gunicorn 20.1.0
idna 3.2
iniconfig 1.1.1
ipdb 0.13.9
ipython 7.28.0
isodate 0.6.0
jedi 0.17.2
Jinja2 3.0.1
jsonschema 4.0.1
lazy-object-proxy 1.6.0
Mako 1.1.5
Markdown 3.3.4
MarkupSafe 2.0.1
marshmallow 3.13.0
marshmallow-oneofschema 3.0.1
matplotlib-inline 0.1.3
mccabe 0.6.1
mock 4.0.3
more-itertools 8.10.0
msal 1.14.0
msal-extensions 0.3.0
msrest 0.6.21
numpy 1.21.2
oauthlib 3.1.1
openapi-core 0.14.2
openapi-schema-validator 0.1.5
openapi-spec-validator 0.3.1
packaging 21.0
parse 1.19.0
parso 0.7.1
pbr 5.6.0
pdoc3 0.10.0
pep8-naming 0.12.1
pexpect 4.8.0
pickleshare 0.7.5
pip 19.3.1
pluggy 1.0.0
portalocker 1.7.1
prompt-toolkit 3.0.20
ptyprocess 0.7.0
py 1.10.0
pycodestyle 2.7.0
pycparser 2.20
pyflakes 2.3.1
Pygments 2.10.0
PyJWT 2.1.0
pyodbc 4.0.32
pyparsing 2.4.7
pyrsistent 0.18.0
pytest 6.2.5
python-dateutil 2.8.2
PyYAML 5.4.1
requests 2.26.0
requests-oauthlib 1.3.0
requests-toolbelt 0.9.1
seqlog 0.3.20
setuptools 41.6.0
six 1.16.0
smmap 4.0.0
stevedore 3.4.0
toml 0.10.2
traitlets 5.1.0
typing-extensions 3.10.0.2
urllib3 1.26.7
wcwidth 0.2.5
Werkzeug 2.0.1 `

File "/usr/local/lib/python3.8/site-packages/openapi_core/spec/shortcuts.py", line 16, in create_spec openapi_v3_spec_validator.validate(spec_dict, spec_url=spec_url) File "/usr/local/lib/python3.8/site-packages/openapi_spec_validator/validators.py", line 49, in validate for err in self.iter_errors(spec, spec_url=spec_url): File "/usr/local/lib/python3.8/site-packages/openapi_spec_validator/decorators.py", line 59, in wrapper for err in errors: File "/usr/local/lib/python3.8/site-packages/openapi_spec_validator/validators.py", line 58, in iter_errors for err in validator.iter_errors(spec): File "/usr/local/lib/python3.8/site-packages/jsonschema/validators.py", line 224, in iter_errors for error in errors: File "/usr/local/lib/python3.8/site-packages/openapi_spec_validator/decorators.py", line 23, in wrapped for res in func(validator, schema_element, instance, schema): File "/usr/local/lib/python3.8/site-packages/jsonschema/_validators.py", line 329, in properties yield from validator.descend( File "/usr/local/lib/python3.8/site-packages/jsonschema/validators.py", line 240, in descend for error in self.evolve(schema=schema).iter_errors(instance): File "/usr/local/lib/python3.8/site-packages/jsonschema/validators.py", line 224, in iter_errors for error in errors: File "/usr/local/lib/python3.8/site-packages/openapi_spec_validator/decorators.py", line 23, in wrapped for res in func(validator, schema_element, instance, schema): File "/usr/local/lib/python3.8/site-packages/jsonschema/_validators.py", line 295, in ref yield from validator.descend(instance, resolved) File "/usr/local/lib/python3.8/site-packages/jsonschema/validators.py", line 240, in descend for error in self.evolve(schema=schema).iter_errors(instance): File "/usr/local/lib/python3.8/site-packages/jsonschema/validators.py", line 224, in iter_errors for error in errors: File "/usr/local/lib/python3.8/site-packages/openapi_spec_validator/decorators.py", line 23, in wrapped for res in func(validator, schema_element, instance, schema): File "/usr/local/lib/python3.8/site-packages/jsonschema/_validators.py", line 25, in patternProperties yield from validator.descend( File "/usr/local/lib/python3.8/site-packages/jsonschema/validators.py", line 240, in descend for error in self.evolve(schema=schema).iter_errors(instance): File "/usr/local/lib/python3.8/site-packages/jsonschema/validators.py", line 224, in iter_errors for error in errors: File "/usr/local/lib/python3.8/site-packages/openapi_spec_validator/decorators.py", line 23, in wrapped for res in func(validator, schema_element, instance, schema): File "/usr/local/lib/python3.8/site-packages/jsonschema/_validators.py", line 295, in ref yield from validator.descend(instance, resolved) File "/usr/local/lib/python3.8/site-packages/jsonschema/validators.py", line 240, in descend for error in self.evolve(schema=schema).iter_errors(instance): File "/usr/local/lib/python3.8/site-packages/jsonschema/validators.py", line 224, in iter_errors

adammkelly added a commit to adammkelly/openapi-spec-validator that referenced this issue Oct 1, 2021
p1c2u added a commit that referenced this issue Jan 13, 2022
Issue #131 - Pin jsonschema to 3.2.0
@yhack
Copy link

yhack commented Dec 17, 2022

I can confirm this issue is present in openapi-spec-validator 0.5.1. I rolled back to 0.3.3 for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants