diff --git a/src/schemathesis/schemas.py b/src/schemathesis/schemas.py index 5213e7d465..c495cf3ca7 100644 --- a/src/schemathesis/schemas.py +++ b/src/schemathesis/schemas.py @@ -19,11 +19,11 @@ from requests.structures import CaseInsensitiveDict from ._hypothesis import make_test_or_exception -from .converter import to_json_schema_recursive from .exceptions import InvalidSchema from .filters import should_skip_by_operation_id, should_skip_by_tag, should_skip_endpoint, should_skip_method from .hooks import HookContext, HookDispatcher, HookLocation, HookScope, dispatch, warn_deprecated_hook from .models import Endpoint, EndpointDefinition, empty_object +from .specs.openapi.converter import to_json_schema_recursive from .specs.openapi.references import ConvertingResolver from .specs.openapi.security import OpenAPISecurityProcessor, SwaggerSecurityProcessor from .types import Filter, GenericTest, Hook, NotSet diff --git a/src/schemathesis/converter.py b/src/schemathesis/specs/openapi/converter.py similarity index 96% rename from src/schemathesis/converter.py rename to src/schemathesis/specs/openapi/converter.py index 6b13b929d0..2b2848b524 100644 --- a/src/schemathesis/converter.py +++ b/src/schemathesis/specs/openapi/converter.py @@ -1,7 +1,7 @@ from copy import deepcopy from typing import Any, Dict -from .utils import traverse_schema +from ...utils import traverse_schema def to_json_schema(schema: Dict[str, Any], nullable_name: str) -> Dict[str, Any]: diff --git a/src/schemathesis/specs/openapi/references.py b/src/schemathesis/specs/openapi/references.py index 7063d8f073..b39b3b03fd 100644 --- a/src/schemathesis/specs/openapi/references.py +++ b/src/schemathesis/specs/openapi/references.py @@ -6,8 +6,8 @@ import jsonschema import yaml -from ...converter import to_json_schema from ...utils import StringDatesYAMLLoader, traverse_schema +from .converter import to_json_schema # Reference resolving will stop after this depth RECURSION_DEPTH_LIMIT = 100 diff --git a/test/test_converter.py b/test/test_converter.py index c96e6bd675..e0f4416a2e 100644 --- a/test/test_converter.py +++ b/test/test_converter.py @@ -1,6 +1,6 @@ import pytest -from schemathesis import converter +from schemathesis.specs.openapi import converter from schemathesis.utils import traverse_schema