diff --git a/openapi_core/schema/schemas/models.py b/openapi_core/schema/schemas/models.py index b4190e1..c7bb63d 100644 --- a/openapi_core/schema/schemas/models.py +++ b/openapi_core/schema/schemas/models.py @@ -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, ) diff --git a/openapi_core/schema_validator/__init__.py b/openapi_core/schema_validator/__init__.py new file mode 100644 index 0000000..a86664a --- /dev/null +++ b/openapi_core/schema_validator/__init__.py @@ -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'] diff --git a/openapi_core/schema/schemas/_format.py b/openapi_core/schema_validator/_format.py similarity index 100% rename from openapi_core/schema/schemas/_format.py rename to openapi_core/schema_validator/_format.py diff --git a/openapi_core/schema/schemas/_types.py b/openapi_core/schema_validator/_types.py similarity index 100% rename from openapi_core/schema/schemas/_types.py rename to openapi_core/schema_validator/_types.py diff --git a/openapi_core/schema/schemas/_validators.py b/openapi_core/schema_validator/_validators.py similarity index 100% rename from openapi_core/schema/schemas/_validators.py rename to openapi_core/schema_validator/_validators.py diff --git a/openapi_core/schema/schemas/validators.py b/openapi_core/schema_validator/validators.py similarity index 94% rename from openapi_core/schema/schemas/validators.py rename to openapi_core/schema_validator/validators.py index eabe4d4..14f0402 100644 --- a/openapi_core/schema/schemas/validators.py +++ b/openapi_core/schema_validator/validators.py @@ -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( diff --git a/tests/unit/schema/test_schemas.py b/tests/unit/schema/test_schemas.py index e09c788..bf307d4 100644 --- a/tests/unit/schema/test_schemas.py +++ b/tests/unit/schema/test_schemas.py @@ -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):