为什么显示不正确?我使用了Swashbuckle v5.6.0。在Swagger UI中,我得到一个像这样的模型:
Inline Model [
Inline Model 1
]
Inline Model 1 {
ID (integer, optional),
WordingFR (string, optional),
WordingNL (string, optional)
}
对于像这样的REST Get方法:
[HttpGet]
[Route("GetCivilStatus")] // this route becomes [controller]/GetCivilStatus
[SwaggerResponse(HttpStatusCode.OK, Type = typeof(IEnumerable<CivilStatus>))]
public List<CivilStatus> GetCivilStatus()
{...}