Skip to content
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

Schema: Exclude OPTIONS/HEAD for ViewSet actions #5532

Conversation

carltongibson
Copy link
Collaborator

Closes #5528.

Viewset custom actions (@detail_route etc) OPTIONS (and HEAD) methods were not being excluded from Schema Generations.

This PR adds a test reproducing the reported error and adjusts EndpointEnumerator.get_allowed_methods() to filter ViewSet actions in the same way as other APIViews

Closes encode#5528.

Viewset custom actions (@detail_route etc) OPTIONS (and HEAD) methods were not being excluded from Schema Generations.

This PR adds a test reproducing the reported error and adjusts `EndpointEnumerator.get_allowed_methods()` to filter ViewSet actions in the same way as other `APIView`s
@carltongibson carltongibson added this to the 3.7.2 milestone Oct 25, 2017
@carltongibson carltongibson merged commit 7261ae6 into encode:master Oct 25, 2017
@carltongibson carltongibson deleted the 372/5528-detail_route-correctly-exclude-OPTIONS-from-schema branch October 25, 2017 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant