Closed jonas0616 closed 2 years ago
You are right, seems like the code do not honor the description provided with fizz.Response
:
https://github.com/wI2L/fizz/blob/14ef3251468432c8494c3e132c956d492f189133/openapi/generator.go#L381
we should check if the desc
argument is empty, and replace it with a stringified description of the status code only in that case.
I'll send a PR asap to fix it.
I am trying to use
fizz.Response
to add additional errors in my documentation. However, the description seems does not work as expected. For example, add one of the following fizz options:I expect the description of the error should be
my error desc
, but it only showsNot Found
in openapi.json.