'how to rename the @Queryparam value(Fin) in springboot such that in JSON i can pass chassisNumber to instead Fin

This is My Springboot Post call, need to rename the Fin attribute to chassisNumber.

AddAdditionalInformationResponseDto addAdditionalInformation(
            @QueryParam("fin") String fin,
            @ApiParam(value = "Date of first registration (Example:YYYY-MM-DD)", required = false, format = "date") @QueryParam("firstRegistrationDate") String firstRegistrationDate,
            @ApiParam(value = "license Plate(Example:1UPG459)", required = false) @QueryParam("licensePlate") String licensePlate,
            
            );

current Json: { "fin":"wer3rr", "firstregistrationdate":02-09-2022, "licenseplate":"ap092323" }

Expected:

urrent Json: { "chassisNumber":"wer3rr", "firstregistrationdate":02-09-2022, "licenseplate":"ap092323" }

I don't want to rename fin, but in json i should pass chassis instead fin.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source