Extending Pagination classes #1037
Unanswered
david-welch
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am wondering if extending the Pagination classes is supported. For instance, would it be possible to extend CursorPagination to add 'previous' cursor as well as link headers. I haven't found a way to do this that doesn't break OpenAPI schema generation. I can create a Page class from
BaseModel
but the schema is empty. Alternatively, I tried to adapt the current implementation of CursorPagination like:But this throws an exception
ImproperlyConfiguredException(f"cannot generate OpenAPI schema for generic type {field_type}")
.Beta Was this translation helpful? Give feedback.
All reactions