【发布时间】:2021-02-12 20:03:04
【问题描述】:
我使用SpringBoot 和springdoc-openapi-ui。我有带有方法的控制器,其中包含数组作为 url 参数:
@Parameters(value = {
@Parameter(in = ParameterIn.QUERY, name = "output", example = "[f1,f2,f3]",
content = @Content(array = @ArraySchema(schema = @Schema(type = "string"))))
})
public ResponseEntity<Object> showReportData(@RequestParam(value = "output") String[] outputFields) {
//some body
}
但是,当我打开 SwaggerUI 时,我在项目文本框中看不到我的示例值:
为什么会这样?为什么示例数组没有显示在item中?
【问题讨论】:
标签: swagger swagger-ui openapi springdoc-openapi-ui