Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If ResponseStatus is specified for operation that should be used as default response not 200 #897

Open
andyrozman opened this issue Nov 2, 2023 · 0 comments

Comments

@andyrozman
Copy link

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);
        }
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant