Forum Discussion

tsaik's avatar
Occasional Visitor
5 years ago

How to Java annotate multiple form parameters of same name?

I have an API operation with one argument of type List<ItemType> where ItemType is an Enum. Following is the code snippet:



			@ApiResponse(responseCode = "200", description = "Successful")
	@Parameter(style = ParameterStyle.FORM, explode = Explode.TRUE)
	public Order placeOrder(@FormParam("item") List<ItemType> item) {
		return new Order(item);


public enum ItemType {



When a request contains multiple items, I expect the serialization to look something like:



However, the Swagger UI is generating the following serialization:




I have tried declaring the 'explode' property in my @Parameter annotation but it has no effect. What am I missing?