Closed
Description
Describe the bug
After updating the library from 1.5.10 to 1.5.12, the openapi.json file has some issues on the parameter's name. It seems they are translated using i18n using the messages.properties file.
I see you introduced the i18n support but I don't expect parameter's name are translated.
To Reproduce
This is the endpoint configuration:
@Operation(summary = "Get the profit and margin metrics")
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "Successful operation"),
@ApiResponse(responseCode = "400", description = "Invalid input"),
@ApiResponse(responseCode = "401", description = "Not authorized"),
@ApiResponse(responseCode = "404", description = "If the resource has not been found"),
@ApiResponse(responseCode = "500", description = "Internal server error"),
})
@GetMapping(value = "/salesMetrics/profitMargin", produces = MediaType.APPLICATION_JSON_VALUE)
ResponseEntity<ProfitMarginMetricDTO> getProfitMarginMetrics(@RequestHeader("TimeZone") String timeZone, @Parameter(description = "The start date", required = true) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) @RequestParam(name = "from") LocalDate from, @Parameter(description = "The end date", required = true) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) @RequestParam(name = "until") LocalDate until);
Expected behavior
- I expect the paramert's names are "from" and "until". Instead "from" parameter is translated to "da" (in Italian). This is the relevant generated JSON:
"/api/v1/salesMetrics/profitMargin": {
"get": {
"tags": [
"SalesMetric"
],
"summary": "Get the profit and margin metrics",
"operationId": "getProfitMarginMetrics",
"parameters": [
{
"name": "TimeZone",
"in": "header",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "da",
"in": "query",
"description": "The start date",
"required": true,
"schema": {
"type": "string",
"format": "date"
}
},
{
"name": "until",
"in": "query",
"description": "The end date",
"required": true,
"schema": {
"type": "string",
"format": "date"
}
}
],
Additional context
In my messages.properties I've the value "from" and the Italian translation of it is "da"