mirror of
https://github.com/correl/openapi-core.git
synced 2024-11-24 19:19:56 +00:00
New schema package
This commit is contained in:
parent
74e33bac23
commit
d8a36cc998
20 changed files with 35 additions and 11 deletions
|
@ -1,3 +1,5 @@
|
|||
from __future__ import division
|
||||
|
||||
from openapi_core.casting.schemas.exceptions import CastError
|
||||
from openapi_core.types import NoValue
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ from openapi_core.deserializing.exceptions import DeserializeError
|
|||
from openapi_core.deserializing.parameters.exceptions import (
|
||||
EmptyParameterValue,
|
||||
)
|
||||
from openapi_core.spec.parameters import get_aslist, get_explode, get_style
|
||||
from openapi_core.schema.parameters import get_aslist, get_explode, get_style
|
||||
|
||||
|
||||
class PrimitiveDeserializer(object):
|
||||
|
|
0
openapi_core/schema/__init__.py
Normal file
0
openapi_core/schema/__init__.py
Normal file
|
@ -1,3 +1,5 @@
|
|||
from __future__ import division
|
||||
|
||||
from six import iteritems
|
||||
|
||||
|
|
@ -1,3 +1,5 @@
|
|||
from __future__ import division
|
||||
|
||||
from six import iteritems
|
||||
|
||||
|
|
@ -1,4 +1,6 @@
|
|||
from openapi_core.spec.servers import get_server_url
|
||||
from __future__ import division
|
||||
|
||||
from openapi_core.schema.servers import get_server_url
|
||||
|
||||
|
||||
def get_spec_url(spec, index=0):
|
|
@ -8,9 +8,7 @@ SPEC_SEPARATOR = '#'
|
|||
class SpecPath(AccessorPath):
|
||||
|
||||
@classmethod
|
||||
def from_spec(
|
||||
cls, spec_dict, dereferencer=None, *args,
|
||||
separator=SPEC_SEPARATOR,
|
||||
):
|
||||
def from_spec(cls, spec_dict, dereferencer=None, *args, **kwargs):
|
||||
separator = kwargs.pop('separator', SPEC_SEPARATOR)
|
||||
accessor = SpecAccessor(spec_dict, dereferencer)
|
||||
return cls(accessor, *args, separator=separator)
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""OpenAPI core templating media types finders module"""
|
||||
from __future__ import division
|
||||
import fnmatch
|
||||
|
||||
from six import iteritems
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
"""OpenAPI core templating paths finders module"""
|
||||
from __future__ import division
|
||||
|
||||
from more_itertools import peekable
|
||||
from six import iteritems
|
||||
from six.moves.urllib.parse import urljoin, urlparse
|
||||
|
||||
from openapi_core.spec.servers import is_absolute
|
||||
from openapi_core.schema.servers import is_absolute
|
||||
from openapi_core.templating.datatypes import TemplateResult
|
||||
from openapi_core.templating.util import parse, search
|
||||
from openapi_core.templating.paths.exceptions import (
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
from __future__ import division
|
||||
|
||||
from openapi_core.templating.responses.exceptions import ResponseNotFound
|
||||
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
from __future__ import division
|
||||
from functools import partial
|
||||
import logging
|
||||
|
||||
|
@ -12,7 +13,7 @@ from six import text_type, binary_type
|
|||
from six import iteritems
|
||||
|
||||
from openapi_core.extensions.models.factories import ModelFactory
|
||||
from openapi_core.spec.schemas import (
|
||||
from openapi_core.schema.schemas import (
|
||||
get_all_properties, get_all_properties_names
|
||||
)
|
||||
from openapi_core.types import NoValue
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""OpenAPI core validation request validators module"""
|
||||
from __future__ import division
|
||||
from itertools import chain
|
||||
from six import iteritems
|
||||
|
||||
|
@ -8,7 +9,7 @@ from openapi_core.exceptions import (
|
|||
MissingRequiredParameter, MissingParameter, MissingRequestBody,
|
||||
)
|
||||
from openapi_core.security.exceptions import SecurityError
|
||||
from openapi_core.spec.parameters import get_aslist, get_explode
|
||||
from openapi_core.schema.parameters import get_aslist, get_explode
|
||||
from openapi_core.templating.media_types.exceptions import MediaTypeFinderError
|
||||
from openapi_core.templating.paths.exceptions import PathError
|
||||
from openapi_core.unmarshalling.schemas.enums import UnmarshalContext
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
"""OpenAPI core validation response validators module"""
|
||||
from __future__ import division
|
||||
|
||||
from openapi_core.casting.schemas.exceptions import CastError
|
||||
from openapi_core.deserializing.exceptions import DeserializeError
|
||||
from openapi_core.exceptions import MissingResponseContent
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
"""OpenAPI core validation validators module"""
|
||||
from __future__ import division
|
||||
|
||||
from openapi_core.unmarshalling.schemas.util import build_format_checker
|
||||
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
from __future__ import division
|
||||
|
||||
from openapi_core.shortcuts import create_spec
|
||||
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
from __future__ import division
|
||||
|
||||
import pytest
|
||||
|
||||
from openapi_core.shortcuts import create_spec
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
from __future__ import division
|
||||
import pytest
|
||||
from base64 import b64encode
|
||||
from six import iteritems, text_type
|
||||
|
||||
from openapi_core.shortcuts import create_spec
|
||||
from openapi_core.spec.servers import get_server_url
|
||||
from openapi_core.spec.specs import get_spec_url
|
||||
from openapi_core.schema.servers import get_server_url
|
||||
from openapi_core.schema.specs import get_spec_url
|
||||
from openapi_core.validation.request.validators import RequestValidator
|
||||
from openapi_core.validation.response.validators import ResponseValidator
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
from __future__ import division
|
||||
import pytest
|
||||
|
||||
from openapi_core.spec.paths import SpecPath
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
from __future__ import division
|
||||
import mock
|
||||
import pytest
|
||||
|
||||
|
|
Loading…
Reference in a new issue