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,8 +38,10 @@ 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:
```python
class DocStringExampleListView(APIView):
"""
get: A description of my GET operation.
@ -47,14 +49,12 @@ include:
"""
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