diff --git a/pyproject.toml b/pyproject.toml index c3cff29..7e29453 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,7 @@ packages = [ [tool.poetry.dependencies] python = "^3.7" tornado = "^4 || ^5 || ^6" -openapi-core = "^0.13.8" +openapi-core = "^0.14.0" ietfparse = "^1.7.0" typing-extensions = "^3.7.4" diff --git a/tests/test_requests.py b/tests/test_requests.py index ebdbfab..e313a61 100644 --- a/tests/test_requests.py +++ b/tests/test_requests.py @@ -7,9 +7,9 @@ import attr from hypothesis import given import hypothesis.strategies as s # type: ignore from openapi_core import create_spec # type: ignore -from openapi_core.exceptions import OpenAPIError # type: ignore -from openapi_core.schema.parameters.exceptions import ( # type: ignore +from openapi_core.exceptions import ( # type: ignore MissingRequiredParameter, + OpenAPIError, ) from openapi_core.validation.request.datatypes import ( # type: ignore RequestParameters, diff --git a/tornado_openapi3/handler.py b/tornado_openapi3/handler.py index e0f87eb..5eb5e5f 100644 --- a/tornado_openapi3/handler.py +++ b/tornado_openapi3/handler.py @@ -4,15 +4,13 @@ from typing import Mapping from openapi_core import create_spec # type: ignore from openapi_core.casting.schemas.exceptions import CastError # type: ignore -from openapi_core.exceptions import OpenAPIError # type: ignore -from openapi_core.deserializing.exceptions import DeserializeError # type: ignore -from openapi_core.schema.specs.models import Spec # type: ignore -from openapi_core.schema.parameters.exceptions import ( # type: ignore - MissingRequiredParameter, -) -from openapi_core.schema.request_bodies.exceptions import ( # type: ignore +from openapi_core.exceptions import ( # type: ignore MissingRequestBody, + MissingRequiredParameter, + OpenAPIError, ) +from openapi_core.deserializing.exceptions import DeserializeError # type: ignore +from openapi_core.spec.paths import SpecPath # type: ignore from openapi_core.templating.media_types.exceptions import ( # type: ignore MediaTypeNotFound, ) @@ -52,7 +50,7 @@ class OpenAPIRequestHandler(tornado.web.RequestHandler): raise NotImplementedError() @property - def spec(self) -> Spec: + def spec(self) -> SpecPath: """The OpenAPI 3 specification. Override this in your request handlers to customize how your OpenAPI 3 diff --git a/tornado_openapi3/testing.py b/tornado_openapi3/testing.py index 6609f3d..2c358bd 100644 --- a/tornado_openapi3/testing.py +++ b/tornado_openapi3/testing.py @@ -4,7 +4,7 @@ import tornado.httpclient # type: ignore import tornado.testing # type: ignore from openapi_core import create_spec # type: ignore -from openapi_core.schema.specs.models import Spec # type: ignore +from openapi_core.spec.paths import SpecPath # type: ignore from tornado_openapi3.responses import ResponseValidator @@ -29,7 +29,7 @@ class AsyncOpenAPITestCase(tornado.testing.AsyncHTTPTestCase): raise NotImplementedError() @property - def spec(self) -> Spec: + def spec(self) -> SpecPath: """The OpenAPI 3 specification. Override this in your test cases to customize how your OpenAPI 3 spec is