mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-11-01 00:17:40 +03:00
Refs #6846 This provides a way for pagination classes to add pagination properties (`count`, `next`, `results` etc.) to OpenAPI response schemas. A new method `get_paginated_response_schema()` has been added to `BasePagination`. This method is intended to mirror `get_paginated_response()` (which takes a `list` and wraps it in a `dict`). Hence, `get_paginated_response_schema()` takes an unpaginated response schema (of type `array`) and wraps that with a schema object of type `object` containing the relevant properties that the pagination class adds to responses. The default implementation of `BasePagination.get_paginated_response_schema()` simply passes the schema through unmodified, for backwards compatibility. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| coreapi.py | ||
| generators.py | ||
| inspectors.py | ||
| openapi.py | ||
| utils.py | ||
| views.py | ||