mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-02 19:40:13 +03:00
Add docs note about disabling schemas for actions
This commit is contained in:
parent
3feea10bae
commit
16bfa3521b
|
@ -243,6 +243,14 @@ You may disable schema generation for a view by setting `schema` to `None`:
|
||||||
...
|
...
|
||||||
schema = None # Will not appear in schema
|
schema = None # Will not appear in schema
|
||||||
|
|
||||||
|
This also applies to extra actions for `ViewSet`s:
|
||||||
|
|
||||||
|
class CustomViewSet(viewsets.ModelViewSet):
|
||||||
|
|
||||||
|
@action(detail=True, schema=None)
|
||||||
|
def extra_action(self, request, pk=None):
|
||||||
|
...
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
**Note**: For full details on `SchemaGenerator` plus the `AutoSchema` and
|
**Note**: For full details on `SchemaGenerator` plus the `AutoSchema` and
|
||||||
|
|
Loading…
Reference in New Issue
Block a user