Reputation: 1
I am working on a code base generating a swagger document correctly.
All of the endpoints have HTTP responses which are referencing #/definitions/HttpError. However, HTTPError is missing from my swagger JSON documentation.
I want to include HTTPError in the "definitions" element of the json doc, but I cannot do so. How can that be included?
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"
}
}
}
}
},
Upvotes: 0
Views: 90