Skip to content

Feat/transaction#33

Merged
felipemelozx merged 5 commits intodevelopfrom
feat/transaction
May 18, 2025
Merged

Feat/transaction#33
felipemelozx merged 5 commits intodevelopfrom
feat/transaction

Conversation

@felipemelozx
Copy link
Owner

@felipemelozx felipemelozx commented May 18, 2025

Pull Request Description

Implements the full transaction module, including controller, service, DTOs, mapper, and integration with account and category entities. Also adds JWT authentication configuration to Swagger documentation.

Related Task

#27

What was done?

  • Created TransactionController with endpoints for creating, retrieving (all and by ID), updating, and deleting transactions.
  • Implemented TransactionService with business logic and integration with AccountService and CategoryService.
  • Added DTOs: CreateTransactionDTO, TransactionUpdateDTO, and TransactionResponseDTO.
  • Created TransactionMapper using MapStruct for entity-DTO conversion.
  • Added TransactionRepository using Spring Data JPA.
  • Updated SwaggerConfig to include JWT bearer authentication for API documentation.

Tests

  • I tested the new feature/fix locally.
  • Write the unit tests.

How to Test

  1. Start the application.
  2. Use Swagger UI or Postman to test the following endpoints:
    • POST /transaction/create — Create a new transaction.
    • GET /transaction — Retrieve all transactions.
    • GET /transaction/{id} — Retrieve a transaction by ID.
    • PUT /transaction/{id} — Update an existing transaction.
    • DELETE /transaction/{id} — Delete a transaction.
  3. Check the Swagger UI to verify JWT authentication is required and functioning.

Dependencies

This implementation depends on working AccountService and CategoryService, as they are used in transaction creation and updates.
Also, ensure JWT tokens are configured to test secured endpoints in Swagger.

Useful Links

@felipemelozx felipemelozx self-assigned this May 18, 2025
@sonarqubecloud
Copy link

@felipemelozx felipemelozx merged commit 703a7df into develop May 18, 2025
5 checks passed
@felipemelozx felipemelozx deleted the feat/transaction branch May 18, 2025 12:49
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.

1 participant