mirror of
https://github.com/correl/openapi-core.git
synced 2024-12-29 11:09:25 +00:00
Move schema validator to separate subpackage
This commit is contained in:
parent
c3f9adadaa
commit
6b6abc0b01
7 changed files with 12 additions and 8 deletions
|
@ -5,11 +5,11 @@ import re
|
|||
|
||||
from jsonschema.exceptions import ValidationError
|
||||
|
||||
from openapi_core.schema.schemas._format import oas30_format_checker
|
||||
from openapi_core.schema_validator import OAS30Validator
|
||||
from openapi_core.schema_validator import oas30_format_checker
|
||||
from openapi_core.schema.schemas.enums import SchemaType
|
||||
from openapi_core.schema.schemas.exceptions import InvalidSchemaValue
|
||||
from openapi_core.schema.schemas.types import NoValue
|
||||
from openapi_core.schema.schemas.validators import OAS30Validator
|
||||
from openapi_core.unmarshalling.schemas.exceptions import (
|
||||
UnmarshalValueError,
|
||||
)
|
||||
|
|
4
openapi_core/schema_validator/__init__.py
Normal file
4
openapi_core/schema_validator/__init__.py
Normal file
|
@ -0,0 +1,4 @@
|
|||
from openapi_core.schema_validator._format import oas30_format_checker
|
||||
from openapi_core.schema_validator.validators import OAS30Validator
|
||||
|
||||
__all__ = ['OAS30Validator', 'oas30_format_checker']
|
|
@ -1,8 +1,8 @@
|
|||
from jsonschema import _legacy_validators, _utils, _validators
|
||||
from jsonschema.validators import create
|
||||
|
||||
from openapi_core.schema.schemas import _types as oas_types
|
||||
from openapi_core.schema.schemas import _validators as oas_validators
|
||||
from openapi_core.schema_validator import _types as oas_types
|
||||
from openapi_core.schema_validator import _validators as oas_validators
|
||||
|
||||
|
||||
BaseOAS30Validator = create(
|
|
@ -621,11 +621,11 @@ class TestSchemaValidate(object):
|
|||
u('2018-01-02T23:59:59Z'),
|
||||
])
|
||||
@mock.patch(
|
||||
'openapi_core.schema.schemas._format.'
|
||||
'openapi_core.schema_validator._format.'
|
||||
'DATETIME_HAS_STRICT_RFC3339', True
|
||||
)
|
||||
@mock.patch(
|
||||
'openapi_core.schema.schemas._format.'
|
||||
'openapi_core.schema_validator._format.'
|
||||
'DATETIME_HAS_ISODATE', False
|
||||
)
|
||||
def test_string_format_datetime_strict_rfc3339(self, value):
|
||||
|
@ -640,11 +640,11 @@ class TestSchemaValidate(object):
|
|||
u('2018-01-02T23:59:59Z'),
|
||||
])
|
||||
@mock.patch(
|
||||
'openapi_core.schema.schemas._format.'
|
||||
'openapi_core.schema_validator._format.'
|
||||
'DATETIME_HAS_STRICT_RFC3339', False
|
||||
)
|
||||
@mock.patch(
|
||||
'openapi_core.schema.schemas._format.'
|
||||
'openapi_core.schema_validator._format.'
|
||||
'DATETIME_HAS_ISODATE', True
|
||||
)
|
||||
def test_string_format_datetime_isodate(self, value):
|
||||
|
|
Loading…
Reference in a new issue