Skip to content

Enums in BeanParam as PathParam or QueryParam 1.5.1-M2 #1019

@swarupe04

Description

@swarupe04

In 1.5.1-M2, enum parameters in BeanParam as PathParam or QueryParam are not showing the drop down list on the swagger ui. Looking at the swagger.json, I don't see the enum values listed which seems to be issue on core side.

As a workaround, I've been using the @ApiParam with allowableValues.

Sample: field in BeanParam object:

 @ApiParam(required = true, value = "type of summary report",
            allowableValues = "summary,summary-jp,summary-uk",
            defaultValue = "summary")
    @PathParam("report_type")
    @DefaultValue("summary")
    @JsonProperty("report_type")
    private ReportType reportType = ReportType.REP_AOP_CORE_METRICS;

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions