remove default error responses from login endpoint

This commit is contained in:
YevhenBondarenko 2023-06-16 11:25:32 +02:00
parent d67d15b0d7
commit 85887fa9af

View File

@ -233,7 +233,9 @@ public class SwaggerConfiguration {
var loginForm = new SecurityRequirement().addList("HTTP login form"); var loginForm = new SecurityRequirement().addList("HTTP login form");
return openAPI -> openAPI.getPaths().entrySet().stream().peek(entry -> { return openAPI -> openAPI.getPaths().entrySet().stream().peek(entry -> {
securityCustomization(loginForm, entry); securityCustomization(loginForm, entry);
defaultErrorResponsesCustomization(entry.getValue()); if (!entry.getKey().equals(LOGIN_ENDPOINT)) {
defaultErrorResponsesCustomization(entry.getValue());
}
}).map(this::tagsCustomization).forEach(openAPI::addTagsItem); }).map(this::tagsCustomization).forEach(openAPI::addTagsItem);
} }