Minor docs tweaking

This commit is contained in:
Tom Christie 2019-12-12 13:31:22 +00:00
parent c8c792cc15
commit 352410fff2

View File

@ -38,23 +38,23 @@ include:
* Porting of the old CoreAPI parsing of docstrings to form OpenAPI operation
descriptions.
Here with an example view class:
In this example view operation descriptions for the `get` and `post` methods will
be extracted from the class docstring:
class DocStringExampleListView(APIView):
"""
get: A description of my GET operation.
post: A description of my POST operation.
"""
```python
class DocStringExampleListView(APIView):
"""
get: A description of my GET operation.
post: A description of my POST operation.
"""
permission_classes = [permissions.IsAuthenticatedOrReadOnly]
def get(self, *args, **kwargs):
pass
def get(self, request, *args, **kwargs):
...
def post(self, request, *args, **kwargs):
pass
Operation descriptions for the `get` and `post` methods will be extracted
from the class docstring.
...
```
## Validator / Default Context