Skip to content

Explode does not work correctly with query parameters #4065

@marvin-marx

Description

@marvin-marx

How to reproduce:

  • have query parameter
  • set explode = Explode.FALSE
  • generate

Observed behaviour:

  • openApi does not specify "explode: false", which per the specs defaults to true for query params (and only for query params)

Expected Behaviour:

  • explode: false is set.

Attached:
Link to specs Specs 3.0.0
Minimun not-Working example:

package com.swarco.sts.cip.vr.bern.vrgateway.bl;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.enums.Explode;
import io.swagger.v3.oas.annotations.enums.ParameterIn;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
@Path("/bar")
class Bar {
    @GET
    @Path("")
    @Produces({"application/json"})
    public void test(
            @Parameter(in = ParameterIn.QUERY, name = "blub", explode = Explode.FALSE) Long[] ids
    ) {}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions