saidhanushae opened a new pull request, #221:
URL: https://github.com/apache/fineract-consumer-facing/pull/221
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
## What and why
Routes `LoansCommandServiceImpl` Fineract loan application command calls
(`calculateOrSubmitLoanApplication`, `updateLoanApplication`, and
`handleCommandsLoan`) through a narrow `LoansFineractClient` interface and
`LoansFineractClientImpl` adapter in
`org.apache.fineract.consumer.infrastructure.fineractclient.service` (following
the `TransferFineractClient`, `IdentityFineractClient`, and
`SummaryFineractClient` pattern). This keeps the generated `LoansApi` Feign
client contained within the infrastructure layer for loan commands and burns
down the frozen `LoansCommandServiceImpl` violations in the ArchUnit store.
Part of #188 (and #186).
## Verification
- Ran `./gradlew compileJava spotbugsMain modernizer`
- Ran `./gradlew test --tests
org.apache.fineract.consumer.LayeringArchitectureTest` and verified the frozen
violations for `LoansCommandServiceImpl` were automatically removed from
`feature-classes-do-not-depend-on-the-generated-fineract-feign-clients-fd283b04.txt`.
- Updated `LoansCommandServiceImplTest` and added
`LoansFineractClientImplTest`.
## Screenshots
Not applicable (backend refactor and unit test changes only).
## AI assistance (optional)
- Tool / model: Gemini
- Harness / workflow: Interactive chat for navigating repo architecture
rules and local Gradle verification.
## Checklist
- [x] I did not hand-edit generated files under
`frontend/src/openapi-client/`.
- [x] Backend code follows the feature and CQRS layout in
[AGENTS.md](AGENTS.md#backend-conventions-consumer) (command and query sides,
module boundaries); frontend code goes through the adapters in
`frontend/src/app/core/adapters/`.
- [x] I did not add entries to a lint or architecture baseline
(suppressions, frozen violations) to get the build passing.
- [x] User-facing strings use translation keys. (Not applicable — backend
refactor only)
- [x] I added or updated tests appropriate to this change, or explained why
tests were not needed.
- [x] UI workflow changes include suitable e2e coverage, including
real-backend testing where relevant. (Not applicable — no UI changes)
- [x] Commits are signed — see [Signing your
commits](CONTRIBUTING.md#signing-your-commits) in CONTRIBUTING.md.
- [x] I followed the [AI-assisted contributions
guidance](CONTRIBUTING.md#ai-assisted-contributions).
- [x] If this adds a feature or changes what a consumer can see or do, I
raised it on
[[email protected]](https://lists.apache.org/[email protected])
first,
or it is a bug fix, refactor or test change, where that does not apply.
--
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]