Add global error handler/swagger annotations#10
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces Swagger annotations for API documentation and implements a global exception handling mechanism for the authentication service. Key changes include:
- Adding custom exception classes and a GlobalExceptionHandler for unified error responses.
- Extending API controllers with Swagger annotations to document login, registration, logout, and token refresh endpoints.
- Updating deployment configurations and CI/CD workflows.
Reviewed Changes
Copilot reviewed 33 out of 37 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/main/java/com/podzilla/auth/model/RefreshToken.java | New entity representing refresh tokens with JPA annotations |
| src/main/java/com/podzilla/auth/model/ERole.java | Enum for defining user roles |
| src/main/java/com/podzilla/auth/exception/*.java | Custom exceptions and a global exception handler |
| src/main/java/com/podzilla/auth/dto/*.java | DTO classes for signup and login requests |
| src/main/java/com/podzilla/auth/controller/*.java | Controllers enhanced with Swagger annotations for API documentation |
| src/main/java/com/podzilla/auth/AuthApplication.java | Bootstrapping the Spring Boot application |
| promtail-config.yml, docker-compose.yml | Updated configurations for logging and container orchestration |
| .github/workflows/*.yml | CI/CD pipeline and linter workflow definitions |
Files not reviewed (4)
- .gitattributes: Language not supported
- mvnw: Language not supported
- mvnw.cmd: Language not supported
- pom.xml: Language not supported
YehiaFarghaly
approved these changes
Apr 30, 2025
Implement foundational authentication features, including user and role management, JWT-based authentication, and role-based security configurations. Add REST endpoints for login, signup, and logout, along with a Dockerized development setup, CI/CD workflows, and logging configurations. # Conflicts: # .github/workflows/ci-cd.yml # src/main/java/com/podzilla/auth/controller/AuthenticationController.java # src/main/java/com/podzilla/auth/model/User.java # src/main/java/com/podzilla/auth/security/JWTAuthenticationFilter.java # src/main/java/com/podzilla/auth/security/SecurityConfig.java # src/main/java/com/podzilla/auth/service/AuthenticationService.java
cd51b0e to
1ddf5f2
Compare
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.
Add Swagger annotations for API documentation and implement custom exception handling.