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

622-ergaenzen-der-apiresponses-annotation-ergebnismeldung-service #928

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion wls-ergebnismeldung-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<org.projectlombok.mapstructbinding.version>0.2.0</org.projectlombok.mapstructbinding.version>
<org.mapstruct.version>1.6.3</org.mapstruct.version>
<org.springdoc.version>2.6.0</org.springdoc.version>
<wls.common.version>1.3.0</wls.common.version>
<wls.common.version>1.4.0</wls.common.version>
<com.tngtech.archunit.version>1.4.0</com.tngtech.archunit.version>
</properties>

Expand Down Expand Up @@ -185,6 +185,11 @@
<artifactId>security</artifactId>
<version>${wls.common.version}</version>
</dependency>
<dependency>
<groupId>de.muenchen.oss.wahllokalsystem.wls-common</groupId>
<artifactId>swagger</artifactId>
<version>${wls.common.version}</version>
</dependency>

<!-- Validation -->
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"org.springframework.data.jpa.convert.threeten",
"de.muenchen.oss.wahllokalsystem.ergebnismeldungservice",
"de.muenchen.oss.wahllokalsystem.wls.common.exception",
"de.muenchen.oss.wahllokalsystem.wls.common.security"
"de.muenchen.oss.wahllokalsystem.wls.common.security",
"de.muenchen.oss.wahllokalsystem.wls.common.swagger"
}
)
public class MicroServiceApplication {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,6 @@ public class AusdruckController {
@ApiResponse(
responseCode = "204", description = "Es existiert kein Ausdruck zu den entsprechenden Kriterien",
content = { @Content() }
),
@ApiResponse(
responseCode = "400", description = "Validierung der Anfrage war nicht erfolgreich",
content = { @Content(mediaType = "application/json", schema = @Schema(implementation = WlsExceptionDTO.class)) }
),
@ApiResponse(
responseCode = "500", description = "Probleme bei der Verarbeitung der Anfrage",
content = { @Content(mediaType = "application/json", schema = @Schema(implementation = WlsExceptionDTO.class)) }
)
}
)
Expand Down Expand Up @@ -79,14 +71,6 @@ public ResponseEntity<String> getAusdruck(@PathVariable("wahlID") final String w
@ApiResponse(
responseCode = "204", description = "Es existiert kein Ausdruck zu den entsprechenden Kriterien",
content = { @Content() }
),
@ApiResponse(
responseCode = "400", description = "Validierung der Anfrage war nicht erfolgreich",
content = { @Content(mediaType = "application/json", schema = @Schema(implementation = WlsExceptionDTO.class)) }
),
@ApiResponse(
responseCode = "500", description = "Probleme bei der Verarbeitung der Anfrage",
content = { @Content(mediaType = "application/json", schema = @Schema(implementation = WlsExceptionDTO.class)) }
)
}
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package de.muenchen.oss.wahllokalsystem.ergebnismeldungservice.rest.awerte;

import de.muenchen.oss.wahllokalsystem.ergebnismeldungservice.service.awerte.AWerteService;
import de.muenchen.oss.wahllokalsystem.wls.common.exception.rest.model.WlsExceptionDTO;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.ArraySchema;
import io.swagger.v3.oas.annotations.media.Content;
Expand Down Expand Up @@ -38,10 +37,6 @@ public class AWerteController {
@ApiResponse(
responseCode = "200", description = "OK",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bitte aussagekräftigere description finden

content = { @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = AWerteDTO.class))) }
),
@ApiResponse(
responseCode = "500", description = "Probleme bei der Verarbeitung der Anfrage",
content = { @Content(mediaType = "application/json", schema = @Schema(implementation = WlsExceptionDTO.class)) }
)
}
)
Expand All @@ -57,10 +52,6 @@ public ResponseEntity<List<AWerteDTO>> getAWerte(@PathVariable("wahlbezirkID") S
@ApiResponse(
responseCode = "200", description = "OK",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bitte aussagekräftigere description finden

content = @Content(schema = @Schema())
),
@ApiResponse(
responseCode = "500", description = "Probleme bei der Verarbeitung der Anfrage",
content = { @Content(mediaType = "application/json", schema = @Schema(implementation = WlsExceptionDTO.class)) }
)
}
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package de.muenchen.oss.wahllokalsystem.ergebnismeldungservice.rest.awerte;

import de.muenchen.oss.wahllokalsystem.ergebnismeldungservice.service.awerte.AsyncProgress;
import de.muenchen.oss.wahllokalsystem.wls.common.exception.rest.model.WlsExceptionDTO;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
Expand All @@ -26,10 +25,6 @@ public class AsyncProgressController {
@ApiResponse(
responseCode = "200", description = "Auskunft über Bearbeitungszustand erhalten",
content = { @Content(mediaType = "application/json", schema = @Schema(implementation = AsyncProgressDTO.class)) }
),
@ApiResponse(
responseCode = "500", description = "Probleme bei der Verarbeitung der Anfrage",
content = { @Content(mediaType = "application/json", schema = @Schema(implementation = WlsExceptionDTO.class)) }
)
}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,6 @@ public class BegruendungController {
@ApiResponse(
responseCode = "204", description = "Es existieren keine Begruendungen zu den entsprechenden Kriterien",
content = { @Content() }
),
@ApiResponse(
responseCode = "400", description = "Validierung der Anfrage war nicht erfolgreich",
content = { @Content(mediaType = "application/json", schema = @Schema(implementation = WlsExceptionDTO.class)) }
),
@ApiResponse(
responseCode = "500", description = "Probleme bei der Verarbeitung der Anfrage",
content = { @Content(mediaType = "application/json", schema = @Schema(implementation = WlsExceptionDTO.class)) }
)
}
)
Expand All @@ -69,10 +61,6 @@ public ResponseEntity<BegruendungDTO> getBegruendung(@PathVariable("wahlbezirkID
@ApiResponse(
responseCode = "400", description = "Validierung der Anfrage war nicht erfolgreich",
content = { @Content(mediaType = "application/json", schema = @Schema(implementation = WlsExceptionDTO.class)) }
Comment on lines 61 to 63
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@ApiResponse(
responseCode = "400", description = "Validierung der Anfrage war nicht erfolgreich",
content = { @Content(mediaType = "application/json", schema = @Schema(implementation = WlsExceptionDTO.class)) }

),
@ApiResponse(
responseCode = "500", description = "Probleme bei der Verarbeitung der Anfrage",
content = { @Content(mediaType = "application/json", schema = @Schema(implementation = WlsExceptionDTO.class)) }
)
}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,9 @@ public class ErgebnismeldungController {
responseCode = "200", description = "Die Übermittlung war erfolgreich",
content = { @Content() }
),
@ApiResponse(
responseCode = "400", description = "Validierung der Anfrage war nicht erfolgreich",
content = { @Content(mediaType = "application/json", schema = @Schema(implementation = WlsExceptionDTO.class)) }
),
@ApiResponse(
responseCode = "409", description = "Die Übermittlung konnte auf Grund fehlender Daten nicht durchgeführt werden",
content = { @Content(mediaType = "application/json", schema = @Schema(implementation = WlsExceptionDTO.class)) }
Comment on lines 44 to 46
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

409 steht für einen konflikt, fehlende daten sind normalerweise 400. bitte prüfen ob die response gelöscht werden kann oder die description angepasst werden muss

),
@ApiResponse(
responseCode = "500", description = "Probleme bei der Verarbeitung der Anfrage",
content = { @Content(mediaType = "application/json", schema = @Schema(implementation = WlsExceptionDTO.class)) }
)
}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import de.muenchen.oss.wahllokalsystem.ergebnismeldungservice.rest.common.StapelartDTO;
import de.muenchen.oss.wahllokalsystem.ergebnismeldungservice.service.ergebnisse.ErgebnisseReference;
import de.muenchen.oss.wahllokalsystem.ergebnismeldungservice.service.ergebnisse.ErgebnisseService;
import de.muenchen.oss.wahllokalsystem.wls.common.exception.rest.model.WlsExceptionDTO;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
Expand Down Expand Up @@ -42,14 +41,6 @@ public class ErgebnisseController extends AbstractController {
@ApiResponse(
responseCode = "204", description = "Es existieren keine Ergebnisse zu den entsprechenden Kriterien",
content = { @Content() }
),
@ApiResponse(
responseCode = "400", description = "Validierung der Anfrage war nicht erfolgreich",
content = { @Content(mediaType = "application/json", schema = @Schema(implementation = WlsExceptionDTO.class)) }
),
@ApiResponse(
responseCode = "500", description = "Probleme bei der Verarbeitung der Anfrage",
content = { @Content(mediaType = "application/json", schema = @Schema(implementation = WlsExceptionDTO.class)) }
)
}
)
Expand All @@ -71,14 +62,6 @@ public ResponseEntity<ErgebnisseDTO> getErgebnisse(@PathVariable("wahlbezirkID")
@ApiResponse(
responseCode = "204", description = "Es existieren keine Ergebnisse zu den entsprechenden Kriterien",
content = { @Content() }
),
@ApiResponse(
responseCode = "400", description = "Validierung der Anfrage war nicht erfolgreich",
content = { @Content(mediaType = "application/json", schema = @Schema(implementation = WlsExceptionDTO.class)) }
),
@ApiResponse(
responseCode = "500", description = "Probleme bei der Verarbeitung der Anfrage",
content = { @Content(mediaType = "application/json", schema = @Schema(implementation = WlsExceptionDTO.class)) }
)
}
)
Expand All @@ -97,14 +80,6 @@ public ResponseEntity<List<ErgebnisseDTO>> getAllErgebnisse(@PathVariable("wahlb
value = {
@ApiResponse(
responseCode = "200", description = "Ergebnisse erfolgreich gespeichert"
),
@ApiResponse(
responseCode = "400", description = "Validierung der Anfrage war nicht erfolgreich",
content = { @Content(mediaType = "application/json", schema = @Schema(implementation = WlsExceptionDTO.class)) }
),
@ApiResponse(
responseCode = "500", description = "Probleme bei der Verarbeitung der Anfrage",
content = { @Content(mediaType = "application/json", schema = @Schema(implementation = WlsExceptionDTO.class)) }
)
}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import de.muenchen.oss.wahllokalsystem.ergebnismeldungservice.rest.AbstractController;
import de.muenchen.oss.wahllokalsystem.ergebnismeldungservice.service.status.StatusService;
import de.muenchen.oss.wahllokalsystem.wls.common.exception.rest.model.WlsExceptionDTO;
import de.muenchen.oss.wahllokalsystem.wls.common.security.domain.BezirkUndWahlID;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Content;
Expand Down Expand Up @@ -37,14 +36,6 @@ public class StatusController extends AbstractController {
@ApiResponse(
responseCode = "204", description = "Es existiert kein Zustand entsprechend der Kriterien",
content = { @Content() }
),
@ApiResponse(
responseCode = "400", description = "Validierung der Anfrage war nicht erfolgreich",
content = { @Content(mediaType = "application/json", schema = @Schema(implementation = WlsExceptionDTO.class)) }
),
@ApiResponse(
responseCode = "500", description = "Probleme bei der Verarbeitung der Anfrage",
content = { @Content(mediaType = "application/json", schema = @Schema(implementation = WlsExceptionDTO.class)) }
)
}
)
Expand All @@ -59,14 +50,6 @@ public ResponseEntity<StatusDTO> getStatus(@PathVariable("wahlID") final String
value = {
@ApiResponse(
responseCode = "200", description = "Zustand erfolgreich gespeichert"
),
@ApiResponse(
responseCode = "400", description = "Validierung der Anfrage war nicht erfolgreich",
content = { @Content(mediaType = "application/json", schema = @Schema(implementation = WlsExceptionDTO.class)) }
),
@ApiResponse(
responseCode = "500", description = "Probleme bei der Verarbeitung der Anfrage",
content = { @Content(mediaType = "application/json", schema = @Schema(implementation = WlsExceptionDTO.class)) }
)
}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import de.muenchen.oss.wahllokalsystem.ergebnismeldungservice.rest.AbstractController;
import de.muenchen.oss.wahllokalsystem.ergebnismeldungservice.service.stimmabgabevermerke.StimmabgabevermerkeService;
import de.muenchen.oss.wahllokalsystem.wls.common.exception.rest.model.WlsExceptionDTO;
import de.muenchen.oss.wahllokalsystem.wls.common.security.domain.BezirkIDUndWaehlerverzeichnisNummer;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Content;
Expand Down Expand Up @@ -37,14 +36,6 @@ public class StimmabgabevermerkeController extends AbstractController {
@ApiResponse(
responseCode = "204", description = "Es existieren keine Stimmabgabevermerke entsprechend der Such-Kriterien.",
content = { @Content() }
),
@ApiResponse(
responseCode = "400", description = "Validierung der Anfrage war nicht erfolgreich.",
content = { @Content(mediaType = "application/json", schema = @Schema(implementation = WlsExceptionDTO.class)) }
),
@ApiResponse(
responseCode = "500", description = "Probleme bei der Verarbeitung der Anfrage.",
content = { @Content(mediaType = "application/json", schema = @Schema(implementation = WlsExceptionDTO.class)) }
)
}
)
Expand All @@ -62,14 +53,6 @@ public ResponseEntity<StimmabgabevermerkeDTO> getStimmabgabevermerke(
value = {
@ApiResponse(
responseCode = "200", description = "Stimmabgabevermerke erfolgreich gespeichert"
),
@ApiResponse(
responseCode = "400", description = "Validierung der Anfrage war nicht erfolgreich",
content = { @Content(mediaType = "application/json", schema = @Schema(implementation = WlsExceptionDTO.class)) }
),
@ApiResponse(
responseCode = "500", description = "Probleme bei der Verarbeitung der Anfrage",
content = { @Content(mediaType = "application/json", schema = @Schema(implementation = WlsExceptionDTO.class)) }
)
}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import de.muenchen.oss.wahllokalsystem.ergebnismeldungservice.rest.AbstractController;
import de.muenchen.oss.wahllokalsystem.ergebnismeldungservice.service.stimmzettelumschlaege.StimmzettelumschlaegeService;
import de.muenchen.oss.wahllokalsystem.wls.common.exception.rest.model.WlsExceptionDTO;
import de.muenchen.oss.wahllokalsystem.wls.common.security.domain.BezirkUndWahlID;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Content;
Expand Down Expand Up @@ -37,14 +36,6 @@ public class StimmzettelumschlaegeController extends AbstractController {
@ApiResponse(
responseCode = "204", description = "Es existiert keine Anzahl an Stimmzettelumschlaegen zu den entsprechenden Kriterien",
content = { @Content() }
),
@ApiResponse(
responseCode = "400", description = "Validierung der Anfrage war nicht erfolgreich",
content = { @Content(mediaType = "application/json", schema = @Schema(implementation = WlsExceptionDTO.class)) }
),
@ApiResponse(
responseCode = "500", description = "Probleme bei der Verarbeitung der Anfrage",
content = { @Content(mediaType = "application/json", schema = @Schema(implementation = WlsExceptionDTO.class)) }
)
}
)
Expand All @@ -60,14 +51,6 @@ public ResponseEntity<StimmzettelumschlaegeDTO> getStimmzettelumschlaege(@PathVa
value = {
@ApiResponse(
responseCode = "200", description = "Anzahl an Stimmzettelumschlaegen erfolgreich gespeichert"
),
@ApiResponse(
responseCode = "400", description = "Validierung der Anfrage war nicht erfolgreich",
content = { @Content(mediaType = "application/json", schema = @Schema(implementation = WlsExceptionDTO.class)) }
),
@ApiResponse(
responseCode = "500", description = "Probleme bei der Verarbeitung der Anfrage",
content = { @Content(mediaType = "application/json", schema = @Schema(implementation = WlsExceptionDTO.class)) }
)
}
)
Expand Down
Loading
Loading