Skip to content

Add global error handler/swagger annotations#10

Merged
NourAlPha merged 9 commits intodevfrom
add-global-error-handler
May 1, 2025
Merged

Add global error handler/swagger annotations#10
NourAlPha merged 9 commits intodevfrom
add-global-error-handler

Conversation

@NourAlPha
Copy link
Copy Markdown
Contributor

Add Swagger annotations for API documentation and implement custom exception handling.

@NourAlPha NourAlPha self-assigned this Apr 28, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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

NourAlPha added 9 commits May 1, 2025 10:33
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
@NourAlPha NourAlPha force-pushed the add-global-error-handler branch from cd51b0e to 1ddf5f2 Compare May 1, 2025 07:36
@NourAlPha NourAlPha merged commit 3c5a3db into dev May 1, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants