# Path: rest_framework_json_schema/helpers.py
# class JSONReturnList(ReturnList):
#     """Extend a DRF ReturnList to include meta and links."""
# 
#     def __init__(self, *args: Any, **kwargs: Any) -> None:
#         """Create a return list."""
#         self.meta = kwargs.pop("meta", None)
#         self.links = kwargs.pop("links", None)
#         super().__init__(*args, **kwargs)


from collections import OrderedDict
from rest_framework.pagination import LimitOffsetPagination
from rest_framework.response import Response
from rest_framework.utils.serializer_helpers import ReturnList
from .helpers import JSONReturnList
"""Pagination serializers determine the structure for paginated responses."""





class JSONAPILimitOffsetPagination(LimitOffsetPagination):
    """Implement JSON API limit/offset pagination."""

    def get_paginated_response(self, data: ReturnList) -> Response:
        """
        Return the paginated response.

        Place the links under the correct location to be used by the
        JSONAPIRenderer to include in the output payload.

        https://jsonapi.org/format/#fetching-pagination
        """
        return Response(

# Path: rest_framework_json_schema/helpers.py
# class JSONReturnList(ReturnList):
#     """Extend a DRF ReturnList to include meta and links."""
# 
#     def __init__(self, *args: Any, **kwargs: Any) -> None:
#         """Create a return list."""
#         self.meta = kwargs.pop("meta", None)
#         self.links = kwargs.pop("links", None)
#         super().__init__(*args, **kwargs)


# Path: rest_framework_json_schema/pagination.py
from collections import OrderedDict
from rest_framework.pagination import LimitOffsetPagination
from rest_framework.response import Response
from rest_framework.utils.serializer_helpers import ReturnList
from .helpers import JSONReturnList

"""Pagination serializers determine the structure for paginated responses."""





class JSONAPILimitOffsetPagination(LimitOffsetPagination):
    """Implement JSON API limit/offset pagination."""

    def get_paginated_response(self, data: ReturnList) -> Response:
        """
        Return the paginated response.

        Place the links under the correct location to be used by the
        JSONAPIRenderer to include in the output payload.

        https://jsonapi.org/format/#fetching-pagination
        """
        return Response(

            JSONReturnList(