Skip to content

Commit

Permalink
Move to jsonschema-path
Browse files Browse the repository at this point in the history
  • Loading branch information
p1c2u committed Oct 13, 2023
1 parent 45bbe0a commit 1d66de7
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions openapi_spec_validator/readers.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
from typing import Mapping
from typing import Tuple

from jsonschema_spec.handlers import all_urls_handler
from jsonschema_spec.handlers import file_handler
from jsonschema_path.handlers import all_urls_handler
from jsonschema_path.handlers import file_handler


def read_from_stdin(filename: str) -> Tuple[Mapping[Hashable, Any], str]:
Expand Down
2 changes: 1 addition & 1 deletion openapi_spec_validator/schemas/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from importlib_resources import as_file
from importlib_resources import files

from jsonschema_spec.readers import FilePathReader
from jsonschema_path.readers import FilePathReader


def get_schema(version: str) -> Tuple[Mapping[Hashable, Any], str]:
Expand Down
4 changes: 2 additions & 2 deletions openapi_spec_validator/shortcuts.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
from typing import Optional
from typing import Type

from jsonschema_spec.handlers import all_urls_handler
from jsonschema_spec.typing import Schema
from jsonschema_path.handlers import all_urls_handler
from jsonschema_path.typing import Schema

from openapi_spec_validator.validation import OpenAPIV2SpecValidator
from openapi_spec_validator.validation import OpenAPIV30SpecValidator
Expand Down
2 changes: 1 addition & 1 deletion openapi_spec_validator/validation/keywords.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from jsonschema._format import FormatChecker
from jsonschema.exceptions import ValidationError
from jsonschema.protocols import Validator
from jsonschema_spec.paths import SchemaPath
from jsonschema_path.paths import SchemaPath
from openapi_schema_validator import oas30_format_checker
from openapi_schema_validator import oas31_format_checker
from openapi_schema_validator.validators import OAS30Validator
Expand Down
2 changes: 1 addition & 1 deletion openapi_spec_validator/validation/proxies.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from typing import Tuple

from jsonschema.exceptions import ValidationError
from jsonschema_spec.typing import Schema
from jsonschema_path.typing import Schema

from openapi_spec_validator.validation.exceptions import OpenAPIValidationError
from openapi_spec_validator.validation.exceptions import ValidatorDetectError
Expand Down
6 changes: 3 additions & 3 deletions openapi_spec_validator/validation/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

from jsonschema.exceptions import ValidationError
from jsonschema.protocols import Validator
from jsonschema_spec.handlers import default_handlers
from jsonschema_spec.paths import SchemaPath
from jsonschema_spec.typing import Schema
from jsonschema_path.handlers import default_handlers
from jsonschema_path.paths import SchemaPath
from jsonschema_path.typing import Schema

from openapi_spec_validator.schemas import openapi_v2_schema_validator
from openapi_spec_validator.schemas import openapi_v30_schema_validator
Expand Down
2 changes: 1 addition & 1 deletion openapi_spec_validator/versions/finders.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from re import compile
from typing import List

from jsonschema_spec.typing import Schema
from jsonschema_path.typing import Schema

from openapi_spec_validator.versions.datatypes import SpecVersion
from openapi_spec_validator.versions.exceptions import OpenAPIVersionNotFound
Expand Down
2 changes: 1 addition & 1 deletion openapi_spec_validator/versions/shortcuts.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from jsonschema_spec.typing import Schema
from jsonschema_path.typing import Schema

from openapi_spec_validator.versions.consts import VERSIONS
from openapi_spec_validator.versions.datatypes import SpecVersion
Expand Down
10 changes: 5 additions & 5 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jsonschema = "^4.18.0"
openapi-schema-validator = "^0.6.0"
python = "^3.8.0"
importlib-resources = {version = ">=5.8,<7.0", python = "<3.9" }
jsonschema-spec = "^0.2.3"
jsonschema-path = "^0.3.0"
lazy-object-proxy = "^1.7.1"

[tool.poetry.extras]
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
from urllib.parse import urlunparse

import pytest
from jsonschema_spec.handlers.file import FilePathHandler
from jsonschema_spec.handlers.urllib import UrllibHandler
from jsonschema_path.handlers.file import FilePathHandler
from jsonschema_path.handlers.urllib import UrllibHandler


def spec_file_url(spec_file, schema="file"):
Expand Down

0 comments on commit 1d66de7

Please sign in to comment.