Dhanno98 commented on code in PR #5940:
URL: https://github.com/apache/fineract/pull/5940#discussion_r3469611070


##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/accounts/api/AccountsApiResourceSwagger.java:
##########
@@ -465,15 +465,26 @@ public static final class 
PostAccountsTypeAccountIdRequest {
 
         private PostAccountsTypeAccountIdRequest() {}
 
+        @Schema(example = "en")
+        public String locale;
+        @Schema(example = "dd MMMM yyyy")
+        public String dateFormat;
+        @Schema(example = "01 January 2026")
+        public String activatedDate;
+        @Schema(example = "05 May 2026")
+        public String requestedDate;
+        @Schema(example = "01 January 2026")
+        public String closedDate;
+        @Schema(description = "Can represent either number of shares or 
transaction IDs")
+        public Object requestedShares;
+
         static final class PostAccountsRequestedShares {
 
             private PostAccountsRequestedShares() {}
 
             @Schema(example = "35")
             public Long id;
         }
-
-        public Set<PostAccountsRequestedShares> requestedShares;
     }

Review Comment:
   You're correct to question those schema changes.
   
   While implementing the integration tests for the charge-rounding feature, I 
found two limitations in the generated client models:
   
   * `PostAccountsTypeAccountIdRequest` does not expose fields required by 
share account commands such as `activate` and `redeemshares` (`locale`, 
`dateFormat`, `activatedDate`, `requestedDate`, etc.).
   * `PostClientsClientIdChargesRequest` exposes `amount` as `Integer`, whereas 
the charge-rounding scenarios require sending decimal values.
   
   My initial approach was to update the OpenAPI schemas so that the generated 
client models would support these use cases, allowing the new integration tests 
to be implemented entirely through the generated Fineract client APIs instead 
of the deprecated RestAssured helpers.
   
   However, after the API backward compatibility checks failed, it became clear 
that these schema changes have broader API implications and are larger in scope 
than what is needed for this rounding PR. Because of that, I reverted the 
schema modifications and reworked the tests to use the existing 
RestAssured-based helpers for the specific flows that depend on those 
incomplete models.
   
   So the current version of this PR no longer contains the schema changes and 
keeps the API surface unchanged. The underlying limitations in the generated 
models still appear to exist, but addressing them would be better handled 
separately from this charge-rounding change.



-- 
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]

Reply via email to