From 352410fff28a2685075e70b6930de4d317398cc6 Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Thu, 12 Dec 2019 13:31:22 +0000 Subject: [PATCH] Minor docs tweaking --- docs/community/3.11-announcement.md | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/docs/community/3.11-announcement.md b/docs/community/3.11-announcement.md index 6351d9047..83dd636d1 100644 --- a/docs/community/3.11-announcement.md +++ b/docs/community/3.11-announcement.md @@ -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. - """ - permission_classes = [permissions.IsAuthenticatedOrReadOnly] +```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. + def post(self, request, *args, **kwargs): + ... +``` ## Validator / Default Context