Result icon indicating copy to clipboard operation
Result copied to clipboard

[Question] How to document responses with swagger?

Open devrus91 opened this issue 2 years ago • 1 comments

If i want to document my responses with swagger how can i do this for BadRequests for example? I usally do this with ProducesResponseTypeAttribute. It requires typeof object and status code. I have tried

[ProducesResponseType(typeof(ModelStateDictionary), 400)]

But it make my swagger froze when opening endpoint info.

devrus91 avatar Feb 27 '23 16:02 devrus91

@ruslanfedoseenko Can you provide a sample repository reproducing your issue so that I can make sure I document how to resolve your issue clearly? There have been recent additions to the codebase that should allow you to implement the behavior you're expecting but a sample would help make sure we address your concerns clearly.

KyleMcMaster avatar Mar 02 '23 10:03 KyleMcMaster

Closing due to lack of activity.

ardalis avatar May 16 '24 18:05 ardalis