Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 20, 2017

Conversation

losnuyh
Copy link
Contributor

@losnuyh losnuyh commented Mar 17, 2017

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
@tomchristie tomchristie changed the title #4996 #4997 Ensure that pagination is not included in API schema when page_size=None. Mar 20, 2017
@tomchristie tomchristie merged commit 7d64cf5 into encode:master Mar 20, 2017
@khakulov
Copy link
Contributor

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
Collaborator

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

@khakulov
Copy link
Contributor

@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
Collaborator

@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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants