AshharAhmadKhan commented on PR #5590:
URL: https://github.com/apache/fineract/pull/5590#issuecomment-4142761205
Hey @adamsaghy, I realised I hadn't addressed your last comment correctly.
You asked to drop the manual JSON parsing and return the response object
directly, but I was still doing `new
JsonParser().parse(response).getAsJsonObject().get("resourceId").getAsInt()`
which wasn't the right approach.
To fix this properly, I added a swagger class
`FixedDepositAccountTransactionsApiResourceSwagger` with the request and
response schema classes, and wired `@RequestBody` and `@ApiResponses`
annotations onto the `adjustTransaction` endpoint. This causes the generator to
produce a typed
`PostFixedDepositAccountsFixedDepositAccountIdTransactionsTransactionIdResponse`
instead of `Call<String>`, which lets `undoFixedDepositTransaction` simply
call `.getResourceId()` and return it as `Long`.
Could you take a look when you get a chance? Thanks!
--
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]