authentik.api.v3.schema.pagination

 1from drf_spectacular.plumbing import (
 2    ResolvedComponent,
 3    build_basic_type,
 4    build_object_type,
 5)
 6from drf_spectacular.types import OpenApiTypes
 7
 8PAGINATION = ResolvedComponent(
 9    name="Pagination",
10    type=ResolvedComponent.SCHEMA,
11    object="Pagination",
12    schema=build_object_type(
13        properties={
14            "next": build_basic_type(OpenApiTypes.NUMBER),
15            "previous": build_basic_type(OpenApiTypes.NUMBER),
16            "count": build_basic_type(OpenApiTypes.NUMBER),
17            "current": build_basic_type(OpenApiTypes.NUMBER),
18            "total_pages": build_basic_type(OpenApiTypes.NUMBER),
19            "start_index": build_basic_type(OpenApiTypes.NUMBER),
20            "end_index": build_basic_type(OpenApiTypes.NUMBER),
21        },
22        required=[
23            "next",
24            "previous",
25            "count",
26            "current",
27            "total_pages",
28            "start_index",
29            "end_index",
30        ],
31    ),
32)
PAGINATION = <drf_spectacular.plumbing.ResolvedComponent object>