UC-01: Player Management Service - Implementation Summary#4
Merged
Conversation
…, OpenAPI documentation, and Flyway migrations (#3) * Initial plan * Add entities, repositories, DTOs, service and controller for player management Co-authored-by: jwellniak <87517644+jwellniak@users.noreply.github.com> * Add integration tests and fix parameter binding issue Co-authored-by: jwellniak <87517644+jwellniak@users.noreply.github.com> * Add unit tests for PlayersService with Mockito Co-authored-by: jwellniak <87517644+jwellniak@users.noreply.github.com> * Add implementation summary document for UC-01 Co-authored-by: jwellniak <87517644+jwellniak@users.noreply.github.com> * ADR * Refactor according to ADR-004, ADR-005, and ADR-007 - Add Lombok dependency and use @DaTa, @NoArgsConstructor, @AllArgsConstructor for entities - Change PlayerRepository to return List<PlayerEntity> instead of Object[] - Add findLatestScoresForPlayers method to PlayerScoreRepository - Refactor PlayersServiceImpl to use @Autowired on private members instead of constructor injection - Update listPlayers to fetch entities first, then load scores separately as per ADR-005 - Update PlayersController to use @Autowired on private members - Update unit tests to match new repository methods Co-authored-by: jwellniak <87517644+jwellniak@users.noreply.github.com> * ADR * Apply ADR-006 (var) and ADR-008 (TestRestTemplate) - Replace explicit type declarations with var throughout PlayersServiceImpl as per ADR-006 - Replace @MockMvc with TestRestTemplate in PlayersControllerIT as per ADR-008 - Update integration tests to use @SpringBootTest with RANDOM_PORT and TestRestTemplate - Convert all test assertions to use AssertJ instead of jsonPath matchers - All 35 tests still passing (16 unit + 19 integration) Co-authored-by: jwellniak <87517644+jwellniak@users.noreply.github.com> * Cleanup * ADR * Add OpenAPI/Swagger annotations as per ADR-010 - Add springdoc-openapi-starter-webmvc-ui dependency (version 2.1.0) - Annotate PlayersController with @tag for API grouping - Add @operation annotations with summaries and descriptions for all endpoints - Add @ApiResponses documenting all response codes (200, 201, 204, 400, 404, 409) - Add @parameter annotations with descriptions and examples - Swagger UI automatically available at /swagger-ui.html - OpenAPI spec available at /v3/api-docs - All 35 tests still passing Co-authored-by: jwellniak <87517644+jwellniak@users.noreply.github.com> * ADR * Add Flyway migrations and Testcontainers configuration per ADR-011 and ADR-012 - Add Flyway dependencies (flyway-core and flyway-database-postgresql) - Add spring-boot-testcontainers dependency for @Serviceconnection support - Configure Flyway in application.properties (enabled, baseline-on-migrate) - Change JPA ddl-auto from 'update' to 'none' (Flyway manages schema now) - Create Flyway migration scripts: - V1__Create_player_table.sql with indexes and constraints - V2__Create_game_table.sql with foreign keys and indexes - V3__Create_player_score_table.sql with indexes - Create PostgresTestcontainersConfig for integration tests - Create application-test.properties with Flyway enabled - Update PlayersControllerIT to use @import(PostgresTestcontainersConfig.class) and @activeprofiles("test") - Remove manual container configuration from tests - All 35 tests passing (16 unit + 19 integration) Co-authored-by: jwellniak <87517644+jwellniak@users.noreply.github.com> * ADR, Swagger --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: jwellniak <87517644+jwellniak@users.noreply.github.com> Co-authored-by: Joern Wellniak <joern.wellniak@partner.bmw.de>
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.