Added notes on OpenAPI changes for 3.11.

This commit is contained in:
Carlton Gibson 2019-12-10 15:53:35 +01:00
parent 1213699905
commit c8c792cc15

View File

@ -28,7 +28,33 @@ This release will be the last to support Python 3.5 or Django 1.11.
## OpenAPI Schema Generation Improvements
...
The OpenAPI schema generation continues to mature. Some highlights in 3.11
include:
* Automatic mapping of Django REST Framework renderers and parsers into OpenAPI
request and response media-types.
* Improved mapping JSON schema mapping types, for example in HStoreFields, and
with large integer values.
* Porting of the old CoreAPI parsing of docstrings to form OpenAPI operation
descriptions.
Here with an example view class:
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 post(self, request, *args, **kwargs):
pass
Operation descriptions for the `get` and `post` methods will be extracted
from the class docstring.
## Validator / Default Context