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


##########
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:
   The reason for this change is that I needed to add integration test coverage 
for the Share Account charge rounding flow introduced in this PR. I 
intentionally used the generated Fineract client APIs instead of the deprecated 
RestAssured helpers, since the project is gradually moving toward client-based 
integration tests.
   
   While implementing the Share Account tests, I found that 
`PostAccountsTypeAccountIdRequest` was incomplete in the generated client 
because the OpenAPI schema only exposed `requestedShares`. However, share 
account commands used by the tests (`activate`, `redeemshares`, etc.) require 
fields such as `locale`, `dateFormat`, `activatedDate`, and `requestedDate`. 
Without exposing those fields in the OpenAPI definition, the generated client 
model could not be used to implement these test flows.
   
   So the schema update was made to enable the `ShareAccountChargeRoundingTest` 
that covers the rounding changes, rather than as an independent Swagger cleanup.
   That said, if you'd prefer this to be split into a separate PR, I'm happy to 
do that.



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