Repository navigation
refactor: relocate ApiResponse, decouple Swagger documentation, and o… - #338
Merged
Merged
Conversation
…pen Swagger endpoints - Relocated the unified `ApiResponse` class to the package `com.xtraction.api.core.web.response` and corrected all global imports. - Extracted OpenAPI/Swagger annotations from major controllers into separate interface-based API contracts. Signed-off-by: aniebietafia <aniebietafia87@gmail.com>
7 of 12 tasks
Contributor
|
|
Comment on lines
+40
to
+41
| @Parameter(description = "Enable encryption (premium feature)") | ||
| boolean enableEncryption, |
| @io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "200", description = "Profile picture deleted successfully", content = @Content(schema = @Schema(implementation = ApiResponse.class))), | ||
| @io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "400", description = "Profile picture not found or already deleted", content = @Content(schema = @Schema(implementation = ApiResponse.class))) | ||
| }) | ||
| ResponseEntity<@NonNull ApiResponse<Void>> deleteProfilePicture(UserDetails authenticatedUser, String userId); |
| @io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "200", description = "Profile picture uploaded successfully", content = @Content(schema = @Schema(implementation = ApiResponse.class))), | ||
| @io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "400", description = "Invalid file type or empty file", content = @Content(schema = @Schema(implementation = ApiResponse.class))) | ||
| }) | ||
| ResponseEntity<@NonNull ApiResponse<String>> uploadProfilePicture(UserDetails authenticatedUser, MultipartFile file, String userId); |
| when(userRepository.findById(userId)).thenReturn(Optional.of(sampleUser)); | ||
|
|
||
| XtractionResponse<String> response = testClass.forceVerifyEmail(userId); | ||
| ApiResponse<String> response = testClass.forceVerifyEmail(userId); |
| when(userRepository.findById(userId)).thenReturn(Optional.of(sampleUser)); | ||
|
|
||
| XtractionResponse<String> response = testClass.unlockUser(userId); | ||
| ApiResponse<String> response = testClass.unlockUser(userId); |
michael-whyte
approved these changes
Jul 1, 2026
michael-whyte
left a comment
Contributor
There was a problem hiding this comment.
This is good to go 👍
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…pen Swagger endpoints
ApiResponseclass to the packagecom.xtraction.api.core.web.responseand corrected all global imports.