Contributions
Error response with example content using annotations
Hi, I am trying to document an api error response with a example of the json body. I couldn't find an example or a fitting annotation. Playing around with the swagger editor I could at least get something that looks like the result I want to achieve. responses: 200: description: "successful operation" schema: $ref: "#/definitions/Pet" 400: description: "Invalid ID supplied" schema: $ref: "#/definitions/ApiResponse" examples: properties: code: 42 message: "Invalid ID supplied" How can I do this with annotations? I want to add that it is a very specific error message, so I don't need to reuse it.Solved18KViews0likes2Comments