SpringForAll / spring-boot-starter-swagger

自制spring boot starter for swagger 2.x,来试试吧,很好用哦~
Apache License 2.0
2.13k stars 523 forks source link

请求参数无法获取example示例 #61

Open shubifeng opened 6 years ago

shubifeng commented 6 years ago
@ApiOperation(value = "商品的销售量,销售额", notes = "订单数据暂未剔除发生部分退款的商品", tags = "xxxxxxxxxxxxxx")
@GetMapping("sales")
public ResultResp<List<WaresSalesResp>> waresSalesList(
        @ApiParam(value = Req.platformTypeDesc, required = true, example = "YUN_MI")
        @NotNull
        @RequestParam(value = Req.platformType) PlatformTypeConst platformType,
        @NotNull
        @ApiParam(value = Req.timeDesc, required = true,  example = "day")
        @RequestParam(value = Req.timeType) TimeTypeConst timeType,
        @ApiParam(example = "1515836000")
        @RequestParam(value = Req.beginTime) long beginTime,
        @ApiParam(example = "1514711000")
        @RequestParam(value = Req.endTime) long endTime) {
    ParamDate paramDate = DateUtils.convert(timeType, beginTime, endTime);
    List<WaresSalesResp> list = waresService.listWaresSales(getOrgId(), getChannelId(), platformType, paramDate);
    return ResultResp.ok(list);
}

不支持 @ApiParam(value = Req.timeDesc, required = true, example = "day") 这种请求参数example?