Skip to content

Commit

Permalink
Merge pull request #316 from it-at-m/eai-no-response-body-on-404
Browse files Browse the repository at this point in the history
remove response body on 404
  • Loading branch information
MrSebastian committed Jun 19, 2024
2 parents 30334b3 + 691d84e commit 95cac2b
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ private void addErrorToApi(Operation operation, Components components) {
if (operation.getResponses() != null) {
addRequestBodyValidationErrorToAPI(operation, components);
}
addNotFoundErrorToAPI(operation, components);
addNotFoundErrorToAPI(operation);
addInternalErrorToAPI(operation, components);
addUnhandledCommunicationErrorToAPI(operation, components);
}
Expand All @@ -72,10 +72,9 @@ private void addRequestBodyValidationErrorToAPI(Operation operation, Components
.content(new Content().addMediaType(APPLICATION_JSON_VALUE, createWlsExceptionDTOMediaType(components))));
}

private void addNotFoundErrorToAPI(Operation operation, Components components) {
private void addNotFoundErrorToAPI(Operation operation) {
operation.getResponses().addApiResponse("404", new ApiResponse()
.description("no resource found")
.content(new Content().addMediaType(APPLICATION_JSON_VALUE, createWlsExceptionDTOMediaType(components))));
.description("resource not found"));
}

private void addInternalErrorToAPI(Operation operation, Components components) {
Expand Down

0 comments on commit 95cac2b

Please sign in to comment.