我要从springfox迁移到OpenAPI springdocs,我必须替换
@ApiImplicitParam(allowMultiple=true)@ApiImplicitParam被@Parameter取代,但是OpenAPI springdoc等同于allowMultiple=true的是什么?
发布于 2022-09-05 10:32:28
您可以使用以下方法
在此之前
@ApiImpl时typeA(value=“Filter by type",allowableValues="typeA,typeB,typeC",allowMultiple=false)
之后
@Parameter(description = "Filter by type",schema=@Schema(type="string",allowableValues={"typeA","typeB","typeC"},defaultValue = "typeA"))
发布于 2022-07-27 17:16:00
这个答案是从@tomjankes在他对->问题的评论中得到的,答案是添加explode=Explode.TRUE。下面是一个对我有用的代码示例:
@Parameters({
@Parameter(name = "sort", **explode = Explode.TRUE**, schema = @Schema(type = "string"), in = ParameterIn.QUERY, description = "Sort setting in the format of: property(,asc|desc). Default sort order is ascending. Multiple sort settings are supported.")
})https://stackoverflow.com/questions/72083759
复制相似问题