Closed steckhelena closed 1 year ago
Thanks for reporting! Would you like to send a Pull Request to address this issue? Remember to add unit tests.
I can write a pull request, as I fixed it locally with a patch. However, I can only get to it next week. Is outputting the description property on both places okay in this case? (inside the MediaType
and the Request Body Object
?)
Let's do that and see the results.
Prerequisites
🚀 Feature Proposal
Currently, the generated OpenAPI spec generated for the following body:
will be something as follows (removing other information that is not
paths
):While the OpenAPI spec uses the following format:
That is: the
description
key is at the same level as thecontent
key.So I propose to add the option or make it the default, to add the description to the same level as the content key.
Motivation
Adequate the output for use with UI documentation generators (in my case, Redoc)
Example
It could either be something like:
or keep the same
description
property and output thedescription
in both places, inside theMediaType
and theRequest Body Object
(I prefer this, but I don't know how it would interact with the rest of the library).