I am trying to change the REST call's @PathVariable. The existing Path Variable is formed by combination of three parameters. The change is to handle Path Variable formed by combination of two parameters. I need this change to be documented in swagger with the earlier shown as Deprecated. I have tried to use both Path Variable with one as @Deprecated like below
@Parameter(description = "x_y_z - x is first ID, y is second ID, z is third ID", required=false )
@Deprecated @PathVariable String x_y_z,
@Parameter(description = "x_y - x is first ID, y is second ID", required=true )
@PathVariable String x_y)
The have changed request mapping value from /aaa/bbb/{x_y_z}
to below
@RequestMapping(value = "/aaa/bbb/{x_y}", method = RequestMethod.GET, produces = "application/json"
With above changes the request fails with 500 error, may be since it is expecting two Path Variables. But the swagger documentation is as expected.
I tried to remove @PathVariable for x_y_z. The request is processed as expected and the swagger now shows x_y_z as deprecated but shows the parameter as (query) instead of (path)
Any suggestions please