python-openapi / openapi-spec-validator

OpenAPI Spec Validator is a CLI, pre-commit hook and python package that validates OpenAPI Specs against the OpenAPI 2.0 (aka Swagger), OpenAPI 3.0 and OpenAPI 3.1 specification.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

openapi_spec_validator fails with jsonschema 4.0

svart-riddare opened this issue · comments

jsonschema python package released version 4.0.0 less than a day ago; openapi_spec_validator does not work with this version :

File "/home/jenkins/.local/lib/python3.5/site-packages/openapi_spec_validator/init.py", line 7, in
from openapi_spec_validator.factories import JSONSpecValidatorFactory
File "/home/jenkins/.local/lib/python3.5/site-packages/openapi_spec_validator/factories.py", line 2, in
from jsonschema import validators
File "/home/jenkins/.local/lib/python3.5/site-packages/jsonschema/init.py", line 56
raise AttributeError(f"module {name} has no attribute {name}")

I do not know if the problem is located in openapi_spec_validator or jsonschema.

Are you using Python 2 or Python 3.5 by any chance?

Yes, python 3.5 in a Debian Stretch.

Created a ticket to track the issue in jsonschema python-jsonschema/jsonschema#845