Sprint Sections 17 Stage 2 Compilations#11
Merged
Conversation
432589b to
eee4acc
Compare
Naz1anmak
requested changes
Oct 18, 2025
There was a problem hiding this comment.
Pull Request Overview
This PR implements compilation management functionality for a Spring Boot application, including admin and public endpoints for creating, updating, deleting, and retrieving compilations of events. It also adds global exception handling infrastructure to the stats service.
- Adds complete CRUD operations for event compilations with admin and public access levels
- Implements exception handling framework with custom BadRequestException and global error handler
- Adds date validation for stats requests to ensure start date precedes end date
Reviewed Changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| stats/stats-server/src/main/java/ru/practicum/exception/ErrorResponse.java | Defines error response structure with request details |
| stats/stats-server/src/main/java/ru/practicum/exception/ErrorHandler.java | Implements global exception handler for BadRequest exceptions |
| stats/stats-server/src/main/java/ru/practicum/exception/BadRequestException.java | Creates custom runtime exception for bad requests |
| stats/stats-server/src/main/java/ru/practicum/controller/StatsController.java | Adds date validation to prevent start date after end date |
| main-service/src/main/java/ru/practicum/event/mapper/EventMapper.java | Adds method to map events to short DTOs without request/view counts |
| main-service/src/main/java/ru/practicum/compilation/service/CompilationServiceImpl.java | Implements core business logic for compilation CRUD operations |
| main-service/src/main/java/ru/practicum/compilation/service/CompilationService.java | Defines service interface for compilation operations |
| main-service/src/main/java/ru/practicum/compilation/repository/CompilationRepository.java | Adds repository methods with custom queries for fetching compilations with events |
| main-service/src/main/java/ru/practicum/compilation/mapper/CompilationMapper.java | Implements MapStruct mapper for compilation entity/DTO conversions |
| main-service/src/main/java/ru/practicum/compilation/dto/UpdateCompilationRequest.java | Removes @notblank validation from title field |
| main-service/src/main/java/ru/practicum/compilation/dto/CompilationDto.java | Changes events field type from List to Set |
| main-service/src/main/java/ru/practicum/compilation/controller/PublicCompilationController.java | Implements public endpoints for retrieving compilations |
| main-service/src/main/java/ru/practicum/compilation/controller/AdminCompilationController.java | Implements admin endpoints for managing compilations |
| .github/copilot-instructions.md | Adds exclamation mark to review language instruction |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
eee4acc to
bd85943
Compare
bd85943 to
7771179
Compare
…_svc_compilations
…r annotations for consistency
Naz1anmak
approved these changes
Oct 18, 2025
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.
No description provided.