Aman-Mittal opened a new issue, #188:
URL: https://github.com/apache/fineract-consumer-facing/issues/188
Part of #186. The project docs contradict each other, and this needs a
decision before any code moves.
- **`AGENTS.md`** ("Backend conventions"): *"Feign clients to Fineract live
in the shared `consumer.infrastructure` package; feature services depend on
narrow service interfaces, not on Feign clients directly. This keeps Fineract
swappable in tests and contained as a dependency."*
- **`docs/consumer/architecture/modules.adoc`** ("Request flow", step 3):
*"Services call typed API classes such as `SavingsAccountApi` from
`infrastructure.fineractclient.generated.api`, wrapping each call in
`FineractCaller.call(...)`."*
The code follows the second. The rule in `LayeringArchitectureTest` that
feature packages do not depend on `infrastructure.fineractclient.generated.api`
follows `AGENTS.md`. It is frozen with 89 recorded dependencies across nine
service implementations:
| Service | Generated clients used |
|---|---|
| `beneficiaries.command.service.BeneficiariesCommandServiceImpl` |
`ClientApi`, `SavingsAccountApi`, `SearchApiApi` |
| `identity.query.service.IdentityQueryServiceImpl` | `ClientIdentifierApi` |
| `loans.command.service.LoansCommandServiceImpl` | `LoansApi` |
| `loans.query.service.LoansQueryServiceImpl` | `LoansApi`,
`LoanTransactionsApi`, `LoanChargesApi`, `GuarantorsApi`, `LoanProductsApi`,
`ClientApi` |
| `savings.query.service.SavingsQueryServiceImpl` | `ClientApi`,
`SavingsAccountApi`, `SavingsAccountTransactionsApi`, `SavingsChargesApi`,
`SavingsProductApi` |
| `summary.query.service.SummaryQueryServiceImpl` | `ClientApi` |
| `transfers.command.service.TransfersCommandServiceImpl` |
`AccountTransfersApi`, `ClientApi`, `SavingsAccountApi` |
| `transfers.query.service.TransfersQueryServiceImpl` |
`AccountTransfersApi`, `ClientApi`, `SavingsAccountApi` |
| `user.query.service.UserQueryServiceImpl` | `ClientApi`,
`ClientChargesApi`, `DefaultApi` |
**Options**
1. **Keep `AGENTS.md` (the rule stays frozen).** Each feature, or
`infrastructure`, gets narrow interfaces for the Fineract calls it makes. The
generated clients sit behind them, so each service can be tested by mocking its
own seam rather than generated classes.
- This also limits how far a regenerated client reaches; #163 had to
rename operation IDs across services and tests.
- Migration would be one PR per feature, each shrinking the store file.
2. **Keep the documented request flow.** Remove the rule, and change
`AGENTS.md` to match `modules.adoc`.
Opinions are welcome here or on the dev list. Until there is a decision, the
frozen rule stops new feature code from adding direct uses, but nobody needs to
migrate anything.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]