'ProducesResponseType Type return for empty return
What is the typeof return to indicate there is empty body return. For example 401 unauthorized returns no body response except 401 status code.
[ProducesResponseType(StatusCodes.Status401Unauthorized)) is showing returning the following in swagger example
{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"additionalProp1": {},
"additionalProp2": {},
"additionalProp3": {}
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
