Response model for specific status codes using Swagger

You can try using cref=”TYPE HERE” on your XML comments like this.

/// <response code="400" cref="CustomErrorModel">Bad Request</response>

B
ut I would suggest using annotations that Swagger gives you.

[SwaggerResponse(HttpStatusCode.OK, Type = typeof(OnlineMerchantQueryResponseInformation))]

attribute your Controllers with this.

Leave a Comment