diff --git a/wls-eai-service/src/main/java/de/muenchen/oss/wahllokalsystem/eaiservice/configuration/SwaggerConfiguration.java b/wls-eai-service/src/main/java/de/muenchen/oss/wahllokalsystem/eaiservice/configuration/SwaggerConfiguration.java index 38921c289..d2fab9fde 100644 --- a/wls-eai-service/src/main/java/de/muenchen/oss/wahllokalsystem/eaiservice/configuration/SwaggerConfiguration.java +++ b/wls-eai-service/src/main/java/de/muenchen/oss/wahllokalsystem/eaiservice/configuration/SwaggerConfiguration.java @@ -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); } @@ -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) {