# Path: rest_framework_json_schema/transforms.py
# class NullTransform(Transform):
#     """A transform that doesn't do anything."""
# 
#     def transform(self, name: str) -> str:
#         """Do nothing."""
#         return name
# 
# class Transform(ABC):
#     """Provide the base interface for transforms."""
# 
#     @abstractmethod
#     def transform(self, name: str) -> str:
#         """Return the transformed name."""
#         ...


import re
from typing import Any, Dict, Optional
from .transforms import NullTransform, Transform
"""Utilities and helpers for filtering."""



FILTER = re.compile(r"^filter\[(\w+)\]$")


def get_query_filters(
    params: Dict[str, Any], transformer: Optional[Transform] = None
) -> Dict[str, Any]:
    """
    Parse JSON API filter query parameters and apply an optional transformation.

    https://jsonapi.org/format/#fetching-filtering
    """

    result = {}

# Path: rest_framework_json_schema/transforms.py
# class NullTransform(Transform):
#     """A transform that doesn't do anything."""
# 
#     def transform(self, name: str) -> str:
#         """Do nothing."""
#         return name
# 
# class Transform(ABC):
#     """Provide the base interface for transforms."""
# 
#     @abstractmethod
#     def transform(self, name: str) -> str:
#         """Return the transformed name."""
#         ...


# Path: rest_framework_json_schema/filters.py
import re
from typing import Any, Dict, Optional
from .transforms import NullTransform, Transform

"""Utilities and helpers for filtering."""



FILTER = re.compile(r"^filter\[(\w+)\]$")


def get_query_filters(
    params: Dict[str, Any], transformer: Optional[Transform] = None
) -> Dict[str, Any]:
    """
    Parse JSON API filter query parameters and apply an optional transformation.

    https://jsonapi.org/format/#fetching-filtering
    """

    result = {}

    transformer = transformer or NullTransform()