Swagger v3 - 从给定的一组值中选择多个值
Swagger v3 - Selecting multiple values from given set of values
我有一个字符串列表参数,但这些值必须属于一组值。
这是我试过的
@Parameter(description = "The type of status filters", content = @Content(array = @ArraySchema(schema = @Schema(implementation = String.class, allowableValues = {"Option 1", "Option 2", "Option 3"}))))
我目前得到的
如您所见,有一个文本字段。
我想要一个下拉菜单。
有什么建议吗?
通过删除 implementation
部分解决
@Parameter(description = "The type of status filters", content = @Content(array = @ArraySchema(schema = @Schema(allowableValues = {"Option 1", "Option 2", "Option 3"}))))
我有一个字符串列表参数,但这些值必须属于一组值。
这是我试过的
@Parameter(description = "The type of status filters", content = @Content(array = @ArraySchema(schema = @Schema(implementation = String.class, allowableValues = {"Option 1", "Option 2", "Option 3"}))))
我目前得到的
如您所见,有一个文本字段。
我想要一个下拉菜单。
有什么建议吗?
通过删除 implementation
部分解决
@Parameter(description = "The type of status filters", content = @Content(array = @ArraySchema(schema = @Schema(allowableValues = {"Option 1", "Option 2", "Option 3"}))))