swagger 怎么描述参数为Map对象的方法

在我们使用swagger2时,一般我们会按以下方式来写代码:

  @ApiImplicitParams({
            @ApiImplicitParam(name = "queryYear", value = "查询年份", dataType = "String", required = true),
            @ApiImplicitParam(name = "xzqhdm", value = "行政区域代码", dataType = "String", required = true)
    })
    @GetMapping(value = "/countZqByTime")
    public R countZqByTime(@RequestParam String queryYear, @RequestParam String xzqhdm) {
        Map params = ContextUtils.getParameterMap(request);
        List hzbgVoList = hzbgService.countZqByTime(params);
        return R.ok().put("object", hzbgVoList);
    }
复制代码

但是最近遇到一个问题,如果我们的方法参数是Map对象时,应该怎么写呢?源码如下:

 @ApiImplicitParams({
            @ApiImplicitParam(name = "id",value = "主键id",dataType = "Integer")
    })
    @RequestMapping(value = "/sysRole/delete", method = RequestMethod.GET)
    public R delete(@RequestParam Map map) {
        service.delete(map);
        return R.ok();
    }
复制代码

请大神们指教

你可能感兴趣的:(swagger 怎么描述参数为Map对象的方法)