Reputation: 1
When using resteasy to generate a swagger-ui by default i got a documented a 200 with my schema a 401 and 403, since i want to add for all my endpoints a 400, 404 and a 500 with an error schema I am asking my self if using
@APIResponses(
value = {
@APIResponse(responseCode = 200,..),
@APIResponse(responseCode = 400,..),
@APIResponse(responseCode = 401,..),
@APIResponse(responseCode = 403,..),
@APIResponse(responseCode = 404,..),
@APIResponse(responseCode = 500,..),
}
)
is this the best way of doing this? Copy pasting this code block to every endpoint looks kinda bad style for me.
Upvotes: 0
Views: 76