Is it possible with ServiceStack.Api.Swagger v3.9.33
to describe the response of an API operation and the returned status codes using Swagger
? Perhaps by attribute decoration on the Response class/properties, etc.
Like the highlighted sections for the following example operation from the pet store API: (http://petstore.swagger.wordnik.com/)
I can only see the HTTP methods and Request DTOS can be decorated on https://github.com/ServiceStack/ServiceStack/wiki/Swagger-API and quick glance at code looks like may not yet be supported, https://github.com/ServiceStack/ServiceStack/tree/master/src/ServiceStack.Api.Swagger
As of now, it's possible if you pull the head of the ServiceStack repo. I just got a pull request merged that adds the option to decorate your request DTOs with an [ApiResponse] attribute. See here for details:
https://github.com/ServiceStack/ServiceStack/issues/590#issuecomment-17575292
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With