FINERACT-2165: Migrate event, provisioning, and standing instruction helpers to fineract-client-feign#5946
Conversation
d80ec46 to
d67b44b
Compare
adamsaghy
left a comment
There was a problem hiding this comment.
Looks half baked cookie...
Please finish the refactor and remove all:
- JSON
- GSON
- Manually creating Lists and Maps
After the refactor we should only use type-safe requests and responses
|
@adamsaghy You're right it looks half done but here's why. the first commit for this PR carries a full migration of these modules
when pushed the migrations then CI failed some DB checks, Indicating some mismatch in the OpenAPI spec from Provisioning* modules (PostProvisioningCriteriaRequest |
|
what do u think will be best for it? |
Its fine if backward compatibility check fails due to API or swagger fix |
d2f4cd4 to
500e7e5
Compare
…helpers to fineract-client-feign
500e7e5 to
0e8570c
Compare
|
|
||
| // Disable FAIL_ON_EMPTY_BEANS for empty responses | ||
| mapper.disable(SerializationFeature.FAIL_ON_EMPTY_BEANS); | ||
| // Only serialize the 'id' field of LoanProductData to avoid sending unsupported parameters |
There was a problem hiding this comment.
i dont think we need this. it's not the mapper responsibility to decide that...
| loanProducts.add(loanProductId.intValue()); | ||
|
|
||
| ProvisioningTransactionHelper transactionHelper = new ProvisioningTransactionHelper(requestSpec, responseSpec); | ||
| Utils.initializeRESTAssured(); |
There was a problem hiding this comment.
Dont use RestAssured... use the feign client...
|
|
||
| var principalOutstanding = summary.get("principalOutstanding"); | ||
| Double statusId = (Double) status.get("id"); | ||
| Double statusId = status.get("id") instanceof Number ? ((Number) status.get("id")).doubleValue() : null; |
There was a problem hiding this comment.
status id as double? Looks incorrect.
b36366b to
0e8570c
Compare
Description
Describe the changes made and why they were made. (Ignore if these details are present on the associated Apache Fineract JIRA ticket.)
Checklist
Please make sure these boxes are checked before submitting your pull request - thanks!
Your assigned reviewer(s) will follow our guidelines for code reviews.