Skip to content

@ApiParam - Allowable values not displayed in Swagger API docs #1244

@jfiala

Description

@jfiala

Version 2.4.0

If e.g. @ApiParam(allowableValues="range[1, 11]") is set, it is never displayed in the API docs (minLength=1, maxLength=11).
It doesn't work directly for a Request parameter:

@RequestParam @ApiParam(value="description", allowableValues="range[1, 11]") String sample;

It also doesn't work if the parameter is declared using @ModelAttribute.

For @ApiModelProperty it works as desired:

@ApiModelProperty(value="description", allowableValues="range[1, 11]")

=> will display minLength=1, maxLength=11.

Can you pls check why this is missing for @ApiParam?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions