You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Usually we need add custom detail/list view in the viewset.
And it has custom parameters which different from the serializer object.
So, how we document for the custom detail/list view function?
I see the formal document, it seems suggest i do like this:
class XXXViewset:
schema = AutoSchema(manual_fields=[
coreapi.Field("extra_field", ...),
])
But if we do like this, all the methods will have this field, not only the custom action.
How to add specific fields to a specific action?
Is there an easy way? How about describe it in the doc string in this function?
I think it will be the humanic way to document a custom detail/list view.