You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the YAML file contains a field with an array of enums, the API Java code generates the field as a single-option select list instead of a multi-select list.
Description
When the YAML file contains a field with an array of enums, the API Java code generates the field as a single-option select list instead of a multi-select list.
It appears as:
Instead of:
Swagger-codegen version
swagger-codegen-maven-plugin 3.0.54
Swagger declaration file content or url
Command line used for generation
mvn clean install
Steps to reproduce
Maven:
Suggest a fix/enhancement
When generating an array of enums, the parameter should be annotated with "@ArraySchema" instead of "@Schema". Now it is being generated as:
@parameter(schema=@Schema(allowableValues={ "0", "1", "2", "3", "4" }))
@Valid @RequestParam(value = "testfield", required = false) List testfield
Instead of:
@parameter(array = @ArraySchema(schema = @Schema(allowableValues = {"0", "1", "2", "3", "4"})))
@Valid @RequestParam(value = "testfield", required = false) List testfield
The text was updated successfully, but these errors were encountered: