I'm trying to get an OpenAPI definition for an existing Jersey project.
I have many methods taking OptionalInt parameters, for example :
public Response listAgents(@Auth AuthenticatedUser auth,
@QueryParam("count") OptionalInt count, @QueryParam("start") OptionalInt start)
Swagger detects these parameters as objects (which is false):
parameters:
- name: count
in: query
schema:
type: object
properties:
empty:
type: boolean
present:
type: boolean
asInt:
type: integer
format: int32
Is there a way to configure Swagger to handle OptionalInt type as Integer type, whitout rewriting each and every method with @Parameter(schema = @Schema(implementation = Integer.class)) annotation on each parameter ?