I want to define a dynamic query parameters, meaning that the key is only known by the client. The value should always be a string.
E.g. ?dynamic1=123124&dynamic2=asdasd
It's possible to define this in OpenAPI spec like this:
parameters:
- name: filters
in: query
description: Filters to apply to the search
style: form
explode: true
schema:
type: object
additionalProperties:
type: string
I tried several things, but the closest that I could do with Swagger Annotations was this.
@Parameter(in = ParameterIn.QUERY, name = "filters", description = "Filters to apply to the search",
style = ParameterStyle.FORM, explode = Explode.TRUE,
schema = @Schema(implementation = Map.class, additionalPropertiesSchema = String.class))
But this still results in the additionalProperties type being object:
parameters:
- name: filters
in: query
description: Filters to apply to the search
style: form
explode: true
schema:
type: object
additionalProperties:
type: object
Is there a way to use the Annotations to achieve the correct yaml representation?