ardalis / Result

A result abstraction that can be mapped to HTTP response codes if needed.
MIT License
866 stars 107 forks source link

[Question] How to document responses with swagger? #115

Closed ruslanfedoseenko closed 5 months ago

ruslanfedoseenko commented 1 year ago

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.

KyleMcMaster commented 1 year ago

@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.

ardalis commented 5 months ago

Closing due to lack of activity.