Skip to content

Commit

Permalink
refactor: Move OpenAPI -> JSON Schema conversion to the specs package
Browse files Browse the repository at this point in the history
  • Loading branch information
Stranger6667 committed May 8, 2020
1 parent eef3d96 commit 471fde3
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/schemathesis/schemas.py
Expand Up @@ -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
Expand Down
@@ -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]:
Expand Down
2 changes: 1 addition & 1 deletion src/schemathesis/specs/openapi/references.py
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion 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


Expand Down

0 comments on commit 471fde3

Please sign in to comment.