Dhanno98 commented on code in PR #5940:
URL: https://github.com/apache/fineract/pull/5940#discussion_r3535598382
##########
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(example = "100", description = "Number of shares to redeem or
a collection of transaction IDs depending on the command.")
+ public Object requestedShares;
Review Comment:
I changed it to `Object` because this endpoint (`POST
/v1/accounts/{type}/{accountId}`) accepts two different payload shapes for
`requestedShares` depending on the command.
For `redeemshares` and `applyadditionalshares`, `requestedShares` is a
numeric value.
For `approveadditionalshares` and `rejectadditionalshares`,
`requestedShares` is a collection of transaction IDs
(`Set<PostAccountsRequestedShares>`).
Since the same request model is shared across all these commands,
`Set<PostAccountsRequestedShares>` only describes the approval/rejection case
and isn't accurate for the other commands. I used `Object` to represent both
payload shapes. If there's a preferred way to model this more precisely, I'm
happy to update it.
--
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]