APIGateway: Fix openapi-spec-validator
import error (#5458)
This commit is contained in:
parent
f61ffc81ec
commit
4a9b4b2743
2
.github/workflows/test_outdated_versions.yml
vendored
2
.github/workflows/test_outdated_versions.yml
vendored
@ -17,6 +17,7 @@ jobs:
|
|||||||
responses-version: ["0.13.0", "0.15.0", "0.17.0", "0.19.0", "0.20.0" ]
|
responses-version: ["0.13.0", "0.15.0", "0.17.0", "0.19.0", "0.20.0" ]
|
||||||
mock-version: [ "3.0.5", "4.0.0", "4.0.3" ]
|
mock-version: [ "3.0.5", "4.0.0", "4.0.3" ]
|
||||||
werkzeug-version: ["2.0.1", "2.1.1"]
|
werkzeug-version: ["2.0.1", "2.1.1"]
|
||||||
|
openapi-spec-validator-version: ["0.4.0", "0.5.0"]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
@ -37,6 +38,7 @@ jobs:
|
|||||||
pip install responses==${{ matrix.responses-version }}
|
pip install responses==${{ matrix.responses-version }}
|
||||||
pip install mock==${{ matrix.mock-version }}
|
pip install mock==${{ matrix.mock-version }}
|
||||||
pip install werkzeug==${{ matrix.werkzeug-version }}
|
pip install werkzeug==${{ matrix.werkzeug-version }}
|
||||||
|
pip install openapi-spec-validator==${{ matrix.openapi-spec-validator-version }}
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: |
|
run: |
|
||||||
|
@ -12,7 +12,11 @@ import time
|
|||||||
from urllib.parse import urlparse
|
from urllib.parse import urlparse
|
||||||
import responses
|
import responses
|
||||||
|
|
||||||
from openapi_spec_validator.exceptions import OpenAPIValidationError
|
try:
|
||||||
|
from openapi_spec_validator.validation.exceptions import OpenAPIValidationError
|
||||||
|
except ImportError:
|
||||||
|
# OpenAPI Spec Validator < 0.5.0
|
||||||
|
from openapi_spec_validator.exceptions import OpenAPIValidationError
|
||||||
from moto.core import BaseBackend, BaseModel, CloudFormationModel
|
from moto.core import BaseBackend, BaseModel, CloudFormationModel
|
||||||
from .utils import create_id, to_path
|
from .utils import create_id, to_path
|
||||||
from moto.core.utils import path_url, BackendDict
|
from moto.core.utils import path_url, BackendDict
|
||||||
|
Loading…
Reference in New Issue
Block a user