FINERACT-2165: Migrate event, provisioning, and standing instruction helpers to fineract-client-feign#5946
Conversation
d80ec46 to
d67b44b
Compare
| final HashMap<String, Object> map = new HashMap<>(); | ||
| map.put("loanProducts", addLoanProducts(loanProducts)); | ||
| map.put("definitions", addProvisioningCategories(categories, liability, expense)); | ||
| public static Map<String, Object> createProvisioningCriteriaJson(List<Integer> loanProducts, List<ProvisioningCategoryData> categories, |
There was a problem hiding this comment.
Do we still need this? It would be better to completely remove.
| private static ArrayList<HashMap<String, Integer>> addLoanProducts(ArrayList<Integer> loanProducts) { | ||
| ArrayList<HashMap<String, Integer>> list = new ArrayList<>(); | ||
| for (int i = 0; i < loanProducts.size(); i++) { | ||
| private static List<HashMap<String, Integer>> addLoanProducts(List<Integer> loanProducts) { |
| int minStart = 0; | ||
| int maxStart = 30; | ||
|
|
||
| public static List<HashMap<String, Object>> addProvisioningCategories(List<ProvisioningCategoryData> categories, Account liability, |
There was a problem hiding this comment.
use type safe requests and responses
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 |
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.