I have this open API annotation
@GET
@Operation(method = "Get orders", description = "GetOrdersRoute",
parameters = {
@Parameter(in = ParameterIn.QUERY, name = "batchSize", required = true,
schema = @Schema(type = "")),
@Parameter(in = ParameterIn.QUERY, name = "fromDate", required = true),
@Parameter(in = ParameterIn.QUERY, name = "filter", required = true)},
responses = {
@ApiResponse(description = "The order",
content = @Content(mediaType = "application/json",
schema = @Schema(implementation = OrderDto.class)))})
@Override
public String handle(@Parameter(hidden = true) Request request, @Parameter(hidden = true) Response response) {
return api.exec();
}
It works. But when I add to @Parameter
to @Schema
any value like schema = @Schema(type = "integer"))
I get an exception:
java.lang.NoSuchMethodError: org.apache.commons.lang3.math.NumberUtils.isCreatable(Ljava/lang/String;)Z
In other words: @Schema(type = ""))
works fine but @Schema(type = "integer"))
doesn't work.
And not only type
parameter in @Schema
annotation. Any override parameter in @Schema
annotation throws this exception.
But @Schema
in @ApiResponse
works fine with any override parameter.