If ResponseStatus is specified for operation that should be used as default response not 200
andyrozman opened this issue · 0 comments
andyrozman commented
So in situtation where we have success result different as 200 (as denoted by ResponseStatus flag, that information should be considered when generating the swagger, at the moment it is ignored (if also ApiResponses is found):
SpringMvcApiReader
ApiResponses responseAnnotation = findMergedAnnotation(method, ApiResponses.class);
if (responseAnnotation != null) {
updateApiResponse(operation, responseAnnotation);
} else {
ResponseStatus responseStatus = findMergedAnnotation(method, ResponseStatus.class);
if (responseStatus != null) {
updateResponseStatus(operation, responseStatus);
}
}