Upgrade openapi-core to 0.14.0

Update exception paths and use new SpecPath type.
This commit is contained in:
Correl Roush 2021-05-07 14:37:55 -04:00
parent 8ae5937631
commit c3e4009eb2
4 changed files with 11 additions and 13 deletions

View file

@ -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"

View file

@ -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,

View file

@ -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

View file

@ -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