8000 OpenAPI: 'description' is a mandatory field on Response.StatusCode · Issue #6833 · encode/django-rest-framework · GitHub
[go: up one dir, main page]

Skip to content
OpenAPI: 'description' is a mandatory field on Response.StatusCode #6833
Closed
@chrisv2

Description

@chrisv2

As per OpenAPI Spec, 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?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0