"""
This type stub file was generated by pyright.
"""

import typing as t
import yaml
from jsonschema.exceptions import ValidationError

"""
Module containing all code related to json schema validation.
"""
class ExtendedSafeLoader(yaml.SafeLoader):
    """Extends the yaml SafeLoader to coerce all keys to string so the result is valid json."""
    def __init__(self, stream) -> None:
        ...
    
    def extended_construct_mapping(self, node, deep=...): # -> dict[str, Any]:
        ...
    


class FileHandler:
    """Handler to resolve file refs."""
    def __call__(self, uri): # -> Any:
        ...
    


class URLHandler:
    """Handler to resolve url refs."""
    def __call__(self, uri): # -> Any:
        ...
    


handlers = ...
def resolve_refs(spec, store=..., base_uri=...): # -> Mapping[Any, Any] | list[Any] | tuple[Any, ...]:
    """
    Resolve JSON references like {"$ref": <some URI>} in a spec.
    Optionally takes a store, which is a mapping from reference URLs to a
    dereferenced objects. Prepopulating the store can avoid network calls.
    """
    ...

def format_error_with_path(exception: ValidationError) -> str:
    """Format a `ValidationError` with path to error."""
    ...

def allow_nullable(validation_fn: t.Callable) -> t.Callable:
    """Extend an existing validation function, so it allows nullable values to be null."""
    ...

def validate_writeOnly(validator, wo, instance, schema): # -> Generator[ValidationError, Any, None]:
    ...

NullableTypeValidator = ...
NullableEnumValidator = ...
Draft4RequestValidator = ...
Draft4ResponseValidator = ...
