Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7k
Closed
Description
Creating an OpenAPI for a project usinghttps://github.com/tfranzel/drf-spectacular together withrest_framework.pagination.CursorPagination raises the following warning:
OpenApiExample could not be paginated because <class 'rest_framework.pagination.CursorPagination'> either has an unknown schema structure or the individual pagination fields did not provide example values themselves. Using the plain example value as fallback.
It would be nice if some examples could be added to this code if it is possible to avoid this nasty warning:
django-rest-framework/rest_framework/pagination.py
Lines 894 to 908 ind507cd8
| defget_paginated_response_schema(self,schema): | |
| return { | |
| 'type':'object', | |
| 'properties': { | |
| 'next': { | |
| 'type':'string', | |
| 'nullable':True, | |
| }, | |
| 'previous': { | |
| 'type':'string', | |
| 'nullable':True, | |
| }, | |
| 'results':schema, | |
| }, | |
| } |
Metadata
Metadata
Assignees
Labels
No labels