-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
What works
Enum directly in the controller.
public enum SomeEnum {
@ApiEnum("First Option")
A, //
@ApiEnum("Second Option")
B, //
C
}
@PostMapping("/some")
public void someMethod(@ApiParam("Some description.") SomeEnum param) {}
It shows properly:
Some description.
A: First Option
B: Second Option
C: @ApiEnum annotation not available
Available values : A, B, C
What doesn't work
Enum nested in class.
SomeEnum the same as above.
public class ParamParent {
@ApiModelProperty("Some description.")
SomeEnum attribute;
}
@PostMapping("/some2")
public void someMethod2(@RequestParam ParamParent param) {}
It didn't show details of enum:
What I tried (but it still doesn't work)
- Add
@ApiModelto classParamParent, - Add
@ApiParamto parameter in controller's method:someMethod2(@ApiParam ParamParent param), - Add or remove
@RequestParamto parameter in controller's method:someMethod2(@RequestParam ParamParent param).
Metadata
Metadata
Assignees
Labels
No labels

