Skip to content

Ensure that pagination is not included in API schema when page_size=None. - #4998

Merged
lovelydinosaur merged 2 commits into
encode:masterfrom
losnuyh:master
Mar 20, 2017
Merged

lovelydinosaur merged 2 commits into
encode:masterfrom
losnuyh:master

Conversation

@losnuyh

@losnuyh losnuyh commented Mar 17, 2017 •

Copy link
Copy Markdown
Contributor

Because there is a default value for pagination_class,
Also check page_size to see if the user is using it.

Closes #4996
Closes #4997

losnuyh added 2 commits March 18, 2017 04:50
because the default value was specified, it did not work properly in API
Document
@lovelydinosaur lovelydinosaur changed the title #4996 #4997 Ensure that pagination is not included in API schema when page_size=None. Mar 20, 2017
@lovelydinosaur
lovelydinosaur merged commit 7d64cf5 into encode:master Mar 20, 2017
@khakulov

Copy link
Copy Markdown

Why are you checking page_size??? It is only PageNumberPagination related. Now LimitOffsetPagination not working with coreapi in v3.6.3.
@tomchristie @COCOLMAN

@xordoquy

Copy link
Copy Markdown
Contributor

@khakulov you should open an issue describing the problem you are facing and mention this change.

@khakulov

Copy link
Copy Markdown

@xordoquy I was just asking why he checked page_size in rest_framework/schemas.py and not in rest_framework.pagination.PageNumberPagination.get_schema_fields. It was just question. The reason is still unclear to me. Whatever i created new issue for the bug #5144

@xordoquy

Copy link
Copy Markdown
Contributor

@khakulov the tone of the comment was misleading and no matter the reason you seem to hit a regression. We can't always think about all the use cases, there are many different so far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants