Repository: encode/django-rest-framework

Issue:
OpenAPI: 'description' is a mandatory field on Response.StatusCode
As per [OpenAPI Spec](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#responseObject), the `response` object must have a `description` property.

## Steps to reproduce

Generate a schema with `manage.py generateschema` and paste it into https://editor.swagger.org/

## Expected behavior

There should be no error message

## Actual behavior

We get an error message 
```
Structural error at paths.[path].get.responses.200
should have required property 'description'
missingProperty: description'
```

Note: The description should be added in `schemas.openapi.AutoSchema._get_responses()`, however I'm not sure what to put in there. An empty string does satisfy editor.swagger.io, but of course doesn't help much.

Should we put the serializer's docstring into the description? Would that make sense?



Discussion:
Let's start by including it but leaving it as an empty string.
Putting something meaningful in there could then be left as a follow up.
Pull requests resolving this would be most welcome.

Thanks! 😃

Resolving patch:
diff --git a/rest_framework/schemas/openapi.py b/rest_framework/schemas/openapi.py
--- a/rest_framework/schemas/openapi.py
+++ b/rest_framework/schemas/openapi.py
@@ -490,6 +490,10 @@ def _get_responses(self, path, method):
                 'content': {
                     ct: {'schema': response_schema}
                     for ct in self.content_types
-                }
+                },
+                # description is a mandatory property,
+                # https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#responseObject
+                # TODO: put something meaningful into it
+                'description': ""
             }
         }


Test patch:
diff --git a/tests/schemas/test_openapi.py b/tests/schemas/test_openapi.py
--- a/tests/schemas/test_openapi.py
+++ b/tests/schemas/test_openapi.py
@@ -84,6 +84,7 @@ def test_path_without_parameters(self):
             'parameters': [],
             'responses': {
                 '200': {
+                    'description': '',
                     'content': {
                         'application/json': {
                             'schema': {
@@ -190,6 +191,7 @@ class View(generics.GenericAPIView):
         responses = inspector._get_responses(path, method)
         assert responses['200']['content']['application/json']['schema']['required'] == ['text']
         assert list(responses['200']['content']['application/json']['schema']['properties'].keys()) == ['text']
+        assert 'description' in responses['200']
 
     def test_response_body_nested_serializer(self):
         path = '/'
@@ -243,6 +245,7 @@ class View(generics.GenericAPIView):
         responses = inspector._get_responses(path, method)
         assert responses == {
             '200': {
+                'description': '',
                 'content': {
                     'application/json': {
                         'schema': {
@@ -283,6 +286,7 @@ class View(generics.GenericAPIView):
         responses = inspector._get_responses(path, method)
         assert responses == {
             '200': {
+                'description': '',
                 'content': {
                     'application/json': {
                         'schema': {