-
Notifications
You must be signed in to change notification settings - Fork 0
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-basisdaten-service #924
base: dev
Are you sure you want to change the base?
622-ergaenzen-der-apiresponses-annotation-basisdaten-service #924
Conversation
WalkthroughThe update modifies the project's dependency configuration and API documentation. In the Maven configuration, the version of the common library is upgraded from 📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (11)
💤 Files with no reviewable changes (1)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
wls-basisdaten-service/src/main/java/de/muenchen/oss/wahllokalsystem/basisdatenservice/rest/handbuch/HandbuchController.java (1)
65-65
: API success response added for POST endpointGood addition of a 200 success response code with descriptive text. However, unlike the UngueltigeWahlscheineController, this endpoint no longer documents the 400 error response for invalid request parameters, despite the method still potentially throwing exceptions (line 75). Consider maintaining consistent error documentation across controllers.
@Operation( description = "Speichern eines Handbuches einer Wahl für eine bestimmte Wahlbezirksart", responses = { @ApiResponse(responseCode = "200", description = "Handbuch erfolgreich gespeichert"), + @ApiResponse( + responseCode = "400", description = "Anfrageparameter sind fehlerhaft", + content = @Content(mediaType = "application/json", schema = @Schema(implementation = WlsExceptionDTO.class)) + ) } )
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (11)
wls-basisdaten-service/pom.xml
(2 hunks)wls-basisdaten-service/src/main/java/de/muenchen/oss/wahllokalsystem/basisdatenservice/MicroServiceApplication.java
(1 hunks)wls-basisdaten-service/src/main/java/de/muenchen/oss/wahllokalsystem/basisdatenservice/rest/handbuch/HandbuchController.java
(2 hunks)wls-basisdaten-service/src/main/java/de/muenchen/oss/wahllokalsystem/basisdatenservice/rest/kopfdaten/KopfdatenController.java
(2 hunks)wls-basisdaten-service/src/main/java/de/muenchen/oss/wahllokalsystem/basisdatenservice/rest/referendumvorlagen/ReferendumvorlagenController.java
(1 hunks)wls-basisdaten-service/src/main/java/de/muenchen/oss/wahllokalsystem/basisdatenservice/rest/ungueltigewahlscheine/UngueltigeWahlscheineController.java
(2 hunks)wls-basisdaten-service/src/main/java/de/muenchen/oss/wahllokalsystem/basisdatenservice/rest/wahlbezirke/WahlbezirkeController.java
(2 hunks)wls-basisdaten-service/src/main/java/de/muenchen/oss/wahllokalsystem/basisdatenservice/rest/wahlen/WahlenController.java
(2 hunks)wls-basisdaten-service/src/main/java/de/muenchen/oss/wahllokalsystem/basisdatenservice/rest/wahltag/WahltageController.java
(2 hunks)wls-basisdaten-service/src/main/java/de/muenchen/oss/wahllokalsystem/basisdatenservice/rest/wahltermindaten/WahltermindatenController.java
(0 hunks)wls-basisdaten-service/src/main/java/de/muenchen/oss/wahllokalsystem/basisdatenservice/rest/wahlvorschlag/WahlvorschlaegeController.java
(1 hunks)
💤 Files with no reviewable changes (1)
- wls-basisdaten-service/src/main/java/de/muenchen/oss/wahllokalsystem/basisdatenservice/rest/wahltermindaten/WahltermindatenController.java
🔇 Additional comments (16)
wls-basisdaten-service/pom.xml (2)
40-40
: Dependency version update is properly aligned with new features.The update to the wls.common version from 1.3.0 to 1.4.0 is appropriate to support the new Swagger functionality being implemented in this PR.
171-175
: New Swagger dependency properly added.The addition of the Swagger dependency from the wls-common library aligns with the PR objective of enhancing API documentation. This dependency will provide the necessary support for the Swagger functionality.
wls-basisdaten-service/src/main/java/de/muenchen/oss/wahllokalsystem/basisdatenservice/MicroServiceApplication.java (1)
31-32
: Appropriate component scan configuration for Swagger.Adding the Swagger package to the component scan ensures that Spring will discover and register all Swagger-related components, which is necessary for the API documentation enhancement.
wls-basisdaten-service/src/main/java/de/muenchen/oss/wahllokalsystem/basisdatenservice/rest/kopfdaten/KopfdatenController.java (2)
6-6
: Appropriate import for API documentation.The addition of the ApiResponse import is necessary for the enhanced API documentation in the controller methods.
23-30
: Improved API documentation with explicit response details.The enhanced @operation annotation now includes a well-defined response specification with HTTP 200 status code and a descriptive message. This improves API documentation clarity and meets the PR objective of enhancing Swagger documentation.
wls-basisdaten-service/src/main/java/de/muenchen/oss/wahllokalsystem/basisdatenservice/rest/wahlvorschlag/WahlvorschlaegeController.java (1)
28-28
: More descriptive API response documentation.The response description has been updated from a generic "OK" to the more specific "Wahlvorschläge erfolgreich zurückgegeben." This improves API documentation by providing clearer context about the successful response.
wls-basisdaten-service/src/main/java/de/muenchen/oss/wahllokalsystem/basisdatenservice/rest/referendumvorlagen/ReferendumvorlagenController.java (1)
26-26
: Good improvement to API documentation.The updated description "Referendumvorlage erfolgreich zurückgegeben" provides more context about what a successful response means in this endpoint, which improves the API documentation.
wls-basisdaten-service/src/main/java/de/muenchen/oss/wahllokalsystem/basisdatenservice/rest/wahltag/WahltageController.java (2)
5-5
: Good addition of import.Adding the import for ApiResponse is required for the new annotations being added.
22-29
: Good restructuring of @operation annotation with detailed response.The updated multi-line format with explicit @ApiResponse annotation clearly documents the successful response for this endpoint. The description "Wahltage erfolgreich zurückgegeben" is informative and follows consistent naming patterns with other endpoints.
wls-basisdaten-service/src/main/java/de/muenchen/oss/wahllokalsystem/basisdatenservice/rest/wahlbezirke/WahlbezirkeController.java (2)
5-5
: Appropriate import for API response annotations.Adding the import for ApiResponse is necessary for the annotations being added below.
23-29
: Good enhancement to API documentation.The restructured @operation annotation with explicit @ApiResponse provides better documentation of the endpoint's behavior. The description "Wahlbezirke erfolgreich zurückgegeben" clearly indicates what a successful response means.
wls-basisdaten-service/src/main/java/de/muenchen/oss/wahllokalsystem/basisdatenservice/rest/wahlen/WahlenController.java (2)
37-37
: Improved response description.The updated description "Wahlen des Wahltags erfolgreich zurückgegeben" is more specific than the previous "OK" description, providing better context about what a successful response means for this endpoint.
51-51
: Good documentation of success response.The added API response description "Wahlen erfolgreich abgespeichert" clearly indicates what happens when the POST operation succeeds, which is helpful for API consumers.
wls-basisdaten-service/src/main/java/de/muenchen/oss/wahllokalsystem/basisdatenservice/rest/ungueltigewahlscheine/UngueltigeWahlscheineController.java (2)
48-50
: API response documentation enhanced for GET endpointThe addition of a proper success response code (200) with a clear description improves the API documentation for consumers. This aligns with the PR objective of enhancing Swagger documentation.
68-68
: API success response added for POST endpointGood addition of a 200 success response code with clear description. Note that this endpoint still maintains the 400 error response (lines 69-72), which provides helpful context for API consumers when validation errors occur.
wls-basisdaten-service/src/main/java/de/muenchen/oss/wahllokalsystem/basisdatenservice/rest/handbuch/HandbuchController.java (1)
47-50
: API success response added for GET endpointThe addition of the 200 response code with a clear description enhances the Swagger documentation for API consumers. This is consistent with the changes in other controllers and aligns with the PR objectives.
Beschreibung:
Definition of Done (DoD):
Backend
Referenzen1:
Verwandt mit Issue #622
Closes #
Summary by CodeRabbit
New Features
Documentation
Footnotes
Nicht zutreffende Referenzen vor dem Speichern entfernen ↩