Swashbuckle.AspNetCore icon indicating copy to clipboard operation
Swashbuckle.AspNetCore copied to clipboard

Missing #/definitions/HttpError in Swashbuckle implementation

Open sourabhagrawal23 opened this issue 2 years ago • 4 comments

Hi, I am working on a code base that is generating a swagger document correctly.

All of the endpoints have HTTP responses which is referencing #/definitions/HttpError. However, HTTPError is missing from my swagger JSON documentation in the "definitions" section.

Expected: HTTPError should be present in the "definitions" element of the JSON doc.

Actual: HTTPError is missing in the "definitions" element of the JSON doc.

Example:

"/User": { "get": { "tags": [ "user" ], "summary": "Get the user information", "description": "User", "operationId": "User_Get_GET", "consumes": [], "produces": [ "application/json", "text/json", "text/html", "application/octet-stream", "application/xml", "text/xml" ], "responses": { "200": { "description": "Successfully returns the system information", "schema": { "$ref": "#/definitions/SystemInfoDto" } }, "403": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/HttpError" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/HttpError" } }, "409": { "description": "Another user has modified this record, please re-retrieve and try again", "schema": { "$ref": "#/definitions/HttpError" } } } } }

sourabhagrawal23 avatar Jul 25 '22 18:07 sourabhagrawal23

me too

zhuhuanzi avatar Nov 07 '22 10:11 zhuhuanzi

@sourabhagrawal23 please create a minimal project that repro's the issue and post to github so I can pull down and troubleshoot.

domaindrivendev avatar Nov 15 '22 21:11 domaindrivendev

This issue is stale because it has been open for 60 days with no activity. It will be automatically closed in 14 days if no further updates are made.

github-actions[bot] avatar Apr 20 '24 01:04 github-actions[bot]

Please provide a minimal reproducible example as a GitHub repository that demonstrates the issue you're experiencing so we can look into this further.

martincostello avatar Apr 20 '24 05:04 martincostello

This issue is stale because it has been open for 60 days with no activity. It will be automatically closed in 14 days if no further updates are made.

github-actions[bot] avatar Jun 26 '24 01:06 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Jul 15 '24 01:07 github-actions[bot]