mirror of
https://github.com/correl/tornado-openapi3.git
synced 2024-11-23 11:09:56 +00:00
Upgrade openapi-core to 0.14.0
Update exception paths and use new SpecPath type.
This commit is contained in:
parent
8ae5937631
commit
c3e4009eb2
4 changed files with 11 additions and 13 deletions
|
@ -14,7 +14,7 @@ packages = [
|
||||||
[tool.poetry.dependencies]
|
[tool.poetry.dependencies]
|
||||||
python = "^3.7"
|
python = "^3.7"
|
||||||
tornado = "^4 || ^5 || ^6"
|
tornado = "^4 || ^5 || ^6"
|
||||||
openapi-core = "^0.13.8"
|
openapi-core = "^0.14.0"
|
||||||
ietfparse = "^1.7.0"
|
ietfparse = "^1.7.0"
|
||||||
typing-extensions = "^3.7.4"
|
typing-extensions = "^3.7.4"
|
||||||
|
|
||||||
|
|
|
@ -7,9 +7,9 @@ import attr
|
||||||
from hypothesis import given
|
from hypothesis import given
|
||||||
import hypothesis.strategies as s # type: ignore
|
import hypothesis.strategies as s # type: ignore
|
||||||
from openapi_core import create_spec # type: ignore
|
from openapi_core import create_spec # type: ignore
|
||||||
from openapi_core.exceptions import OpenAPIError # type: ignore
|
from openapi_core.exceptions import ( # type: ignore
|
||||||
from openapi_core.schema.parameters.exceptions import ( # type: ignore
|
|
||||||
MissingRequiredParameter,
|
MissingRequiredParameter,
|
||||||
|
OpenAPIError,
|
||||||
)
|
)
|
||||||
from openapi_core.validation.request.datatypes import ( # type: ignore
|
from openapi_core.validation.request.datatypes import ( # type: ignore
|
||||||
RequestParameters,
|
RequestParameters,
|
||||||
|
|
|
@ -4,15 +4,13 @@ from typing import Mapping
|
||||||
|
|
||||||
from openapi_core import create_spec # type: ignore
|
from openapi_core import create_spec # type: ignore
|
||||||
from openapi_core.casting.schemas.exceptions import CastError # type: ignore
|
from openapi_core.casting.schemas.exceptions import CastError # type: ignore
|
||||||
from openapi_core.exceptions import OpenAPIError # type: ignore
|
from openapi_core.exceptions import ( # 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
|
|
||||||
MissingRequestBody,
|
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
|
from openapi_core.templating.media_types.exceptions import ( # type: ignore
|
||||||
MediaTypeNotFound,
|
MediaTypeNotFound,
|
||||||
)
|
)
|
||||||
|
@ -52,7 +50,7 @@ class OpenAPIRequestHandler(tornado.web.RequestHandler):
|
||||||
raise NotImplementedError()
|
raise NotImplementedError()
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def spec(self) -> Spec:
|
def spec(self) -> SpecPath:
|
||||||
"""The OpenAPI 3 specification.
|
"""The OpenAPI 3 specification.
|
||||||
|
|
||||||
Override this in your request handlers to customize how your OpenAPI 3
|
Override this in your request handlers to customize how your OpenAPI 3
|
||||||
|
|
|
@ -4,7 +4,7 @@ import tornado.httpclient # type: ignore
|
||||||
import tornado.testing # type: ignore
|
import tornado.testing # type: ignore
|
||||||
|
|
||||||
from openapi_core import create_spec # 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
|
from tornado_openapi3.responses import ResponseValidator
|
||||||
|
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ class AsyncOpenAPITestCase(tornado.testing.AsyncHTTPTestCase):
|
||||||
raise NotImplementedError()
|
raise NotImplementedError()
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def spec(self) -> Spec:
|
def spec(self) -> SpecPath:
|
||||||
"""The OpenAPI 3 specification.
|
"""The OpenAPI 3 specification.
|
||||||
|
|
||||||
Override this in your test cases to customize how your OpenAPI 3 spec is
|
Override this in your test cases to customize how your OpenAPI 3 spec is
|
||||||
|
|
Loading…
Reference in a new issue