rymghosn opened a new pull request, #6291: URL: https://github.com/apache/fineract/pull/6291
`TaxGroupComponent` (the request DTO used by `POST /v1/taxes/group` and
`PUT /v1/taxes/group/{taxGroupId}`) was missing the `id` and `endDate`
fields — it only declared `taxComponentId` and `startDate`.
`TaxGroupApiResource#createTaxGroup`/`#updateTaxGroup` deserialize the
incoming JSON request body into this DTO and then re-serialize it before
handing it off to the command handler. Because the DTO didn't declare
`id`/`endDate`, Jackson silently dropped those values during that
round-trip for any client that submitted them — before the tax group's
write-platform service or validators ever saw them. In practice this made
it impossible to correctly update an existing tax group's components (e.g.
resubmitting an existing component's `id`, or setting/keeping its
`endDate`).
This is a pre-existing mismatch between the DTO and its own documented
contract: `TaxGroupApiResource`'s Swagger docs already state
> Optional Fields in taxComponents: id, startDate and endDate
for tax group creation — the DTO just never actually had the
`id`/`endDate`
fields to back that documentation.
## Fix
Add the missing `id` and `endDate` fields to `TaxGroupComponent`, matching
what the API already documents and what `TaxGroupData`/response-side
mapping already expects.
PR:(https://issues.apache.org/jira/browse/FINERACT-2770)
--
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]
