Repository: getmoto/moto

Issue:
Incompatible with openapi-spec-validator >= 0.5
## Reporting Bugs

In a virtual environment,
```
$ pip install moto==4.0.2 openapi-spec-validator==0.5.1
$ cat test-moto.py
from moto import mock_apigateway

@mock_apigateway
def foo():
    pass
$ python test-moto.py 
Traceback (most recent call last):
  File "/home/yen/tmp/test-moto.py", line 4, in <module>
    def foo():
  File "/home/yen/tmp/venv/lib/python3.10/site-packages/moto/__init__.py", line 8, in f
    module = importlib.import_module(module_name, "moto")
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/yen/tmp/venv/lib/python3.10/site-packages/moto/apigateway/__init__.py", line 1, in <module>
    from .models import apigateway_backends
  File "/home/yen/tmp/venv/lib/python3.10/site-packages/moto/apigateway/models.py", line 15, in <module>
    from openapi_spec_validator.exceptions import OpenAPIValidationError
ImportError: cannot import name 'OpenAPIValidationError' from 'openapi_spec_validator.exceptions' (/home/yen/tmp/venv/lib/python3.10/site-packages/openapi_spec_validator/exceptions.py)
```

There is no error with `openapi-spec-validator==0.4.0`.


Discussion:

Resolving patch:
diff --git a/moto/apigateway/models.py b/moto/apigateway/models.py
--- a/moto/apigateway/models.py
+++ b/moto/apigateway/models.py
@@ -12,7 +12,11 @@
 from urllib.parse import urlparse
 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 .utils import create_id, to_path
 from moto.core.utils import path_url, BackendDict


Test patch:
diff --git a/.github/workflows/test_outdated_versions.yml b/.github/workflows/test_outdated_versions.yml
--- a/.github/workflows/test_outdated_versions.yml
+++ b/.github/workflows/test_outdated_versions.yml
@@ -17,6 +17,7 @@ jobs:
         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" ]
         werkzeug-version: ["2.0.1", "2.1.1"]
+        openapi-spec-validator-version: ["0.4.0", "0.5.0"]
 
     steps:
     - name: Checkout repository
@@ -37,6 +38,7 @@ jobs:
         pip install responses==${{ matrix.responses-version }}
         pip install mock==${{ matrix.mock-version }}
         pip install werkzeug==${{ matrix.werkzeug-version }}
+        pip install openapi-spec-validator==${{ matrix.openapi-spec-validator-version }}
 
     - name: Run tests
       run: |