is_list_view()
schema util handling of custom viewset actions
#8299
Unanswered
kronion
asked this question in
Potential Issue
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a viewset with a custom action that I'm generating a schema for. The action is registered as returning a collection rather than a single object, ie the method is decorated with
@action(detail=False)
. I expected this endpoint to be considered a list view during schema generation, but it isn't.The
is_list_view()
utility function only considers the viewset action's string name when deciding if an action is a list action:It doesn't consider the value of
view.detail
.Is this a bug? Or is there a reason why custom actions should not be considered list views during schema generation?
Beta Was this translation helpful? Give feedback.
All reactions