小编p0_*_*0_G的帖子

ProducesResponseType 空返回的类型返回

返回的 typeof 表示有空主体返回。例如,401 未经授权不会返回除 401 状态代码之外的正文响应。 [ProducesResponseType(StatusCodes.Status401Unauthorized))显示在 swagger 示例中返回以下内容

{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "additionalProp1": {},
  "additionalProp2": {},
  "additionalProp3": {}
}
Run Code Online (Sandbox Code Playgroud)

c# asp.net-core

9
推荐指数
1
解决办法
1733
查看次数

标签 统计

asp.net-core ×1

c# ×1