Develop#9
Merged
Merged
Conversation
- datafaker 2.4.2 (test scope) for realistic test data generation
- jacoco-maven-plugin 0.8.13 with prepare-agent + report executions
- bind @{argLine} in Surefire so JaCoCo agent is picked up at initialize phase
…r and testing guide - AbstractIntegrationTest: @SpringBootTest + @testcontainers + postgres:18-alpine base - ChargeTestData: fluent builder for Charge domain object in tests - TESTING.md: documents the Node/TS→Java test pattern migration - Remove PaymentApiApplicationIT (replaced by focused slice tests)
Log charge_created in INFO after successful save, capturing the business event without leaking infrastructure details.
…400/422/500) - MethodArgumentNotValidException → 400 with per-field errors map and traceId - DomainException → 422 with message and traceId - Exception (unexpected) → 500 logged in ERROR; only case where 4xx are never logged - @order(HIGHEST_PRECEDENCE) ensures this handler wins over Spring Boot's ProblemDetailsExceptionHandler
- TestcontainersConfiguration: shared postgres:17-alpine container with @Serviceconnection - AbstractIntegrationTest: @DataJpaTest slice + @AutoConfigureTestDatabase(replace=NONE) so persistence tests use real Postgres instead of H2
…on for invalid amount InvalidAmountException extends DomainException (code=INVALID_AMOUNT), so the existing 422 handler picks it up automatically. IllegalArgumentException is now reserved for genuine programming errors that should surface as 500.
feat(charge): implement create charge domain — EPIC-001
- Expand jakarta.persistence.* star import to explicit imports - Add braces to single-line if statements in Charge.equals()
…(postgres:18-alpine)
feat(charge): implement create charge domain — EPIC-001
- springdoc-openapi-starter-webmvc-ui 2.8.17 - OpenApiConfig with project info and contact - @tag / @operation / @ApiResponses on ChargeController (201, 400, 422, 500) - @Schema on CreateChargeRequest and CreateChargeResponse with examples - springdoc paths configured in application.yml - Swagger UI: /swagger-ui.html | Spec: /v3/api-docs
- Status table with EPIC progress (001 done, 002/003/008 roadmap) - Updated stack table with SpringDoc 2.8.17 - Accurate package tree showing implemented classes - API section with request/response examples and error format - Endpoints table includes Swagger UI and OpenAPI spec URLs - Tests table documenting each test class and coverage - Roadmap replaced by EPIC status table
spring.application.name=payment-api added to application.yml (default for host-mode dev) and SPRING_APPLICATION_NAME env var added to docker-compose.yml (immediate effect on the running container without rebuild). Fixes Jaeger reporting traces as unknown_service.
Banking systems must not use floating-point for money. Changes: - Money: compact constructor now normalises to scale=2 (RoundingMode.UNNECESSARY); amounts with more than 2 decimal places throw InvalidAmountException. - ChargeJpaEntity: BigDecimal amount → Long amountCentavos (BIGINT in PostgreSQL). Column renamed to amount_centavos for self-documentation. - ChargeMapper: toEntity converts via movePointRight(2).longValueExact(); toDomain reconstructs via BigDecimal.valueOf(centavos, 2). - README: documents the centavos storage decision and corrects minor inaccuracies. All 21 tests (16 unit + 5 IT) green. Schema verified: amount_centavos bigint.
feat(charge): EPIC-001 — create charge vertical slice (domain → REST → tests)
Epic/create charge
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.