From ab0c57718a15ceb92b33a3189fc8d626304363b0 Mon Sep 17 00:00:00 2001 From: nmgeek Date: Tue, 24 Jan 2017 02:57:14 -0700 Subject: [PATCH] Direct readers to info on how to add viewset docs (#4844) I believe the original statement was wrong. You can, in fact, document the various API endpoints of a ViewSet. --- docs/topics/documenting-your-api.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/topics/documenting-your-api.md b/docs/topics/documenting-your-api.md index 38f365d7d..ef4d2b4a8 100644 --- a/docs/topics/documenting-your-api.md +++ b/docs/topics/documenting-your-api.md @@ -105,7 +105,7 @@ If the python `markdown` library is installed, then [markdown syntax][markdown] [ref]: http://example.com/activating-accounts """ -Note that one constraint of using viewsets is that any documentation be used for all generated views, so for example, you cannot have differing documentation for the generated list view and detail view. +Note that when using viewsets the basic docstring is used for all generated views. To provide descriptions for each view, such as for the the list and retrieve views, use docstring sections as described in [Schemas as documentation: Examples][schemas-examples]. #### The `OPTIONS` method @@ -148,3 +148,4 @@ To implement a hypermedia API you'll need to decide on an appropriate media type [image-django-rest-swagger]: ../img/django-rest-swagger.png [image-apiary]: ../img/apiary.png [image-self-describing-api]: ../img/self-describing.png +[schemas-examples]: api-guide/schemas/#examples