How to make Swagger show examples of objects returned from the API?
That should be pretty straightforward: [Route(“{organizationSys:int}”)] [ProducesResponseType(typeof(List<Door>), 200)] [ProducesResponseType(typeof(string), 400)] public IHttpActionResult Get(int organizationSys) Note that since you have 2 exit points: one normal return with data, and a catch that returns error message, I’ve defined in the example above two possible result types: http:200(OK) with List<Door> http:400(BadRequest) with string Swashbuckle Swagger infrastructure will read … Read more