sphinx-contrib / openapi

OpenAPI (fka Swagger) spec renderer for Sphinx.
https://sphinxcontrib-openapi.readthedocs.io
BSD 2-Clause "Simplified" License
111 stars 81 forks source link

Allow description to be optional #120

Closed flxdot closed 1 year ago

flxdot commented 3 years ago

I encountered this problem during the usage of this library in a project of mine. One endpoint was missing a description, which resulted in an build error.

This Pullrequest allows descriptions of any sort to be missing from the openapi.json.

The Specification it self does not require those fields (see https://swagger.io/specification/), thus this library should not force the user to provide it.

I would greatly appreciate, if this proposal makes it way into the next release.

tuffnatty commented 1 year ago

Both in OpenAPI spec 2.0 and 3.0, description is a Required field on Response object, so I don't think this patch is fully correct.