Skip to content

Commit 8abc98d

Browse files
committed
修正swagger文档参数类型
1 parent 6935fc0 commit 8abc98d

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

‎demos/producer/src/main/java/com/springboot/cloud/demos/producer/rest/ProductController.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@ public Result add(@Valid @RequestBody ProductForm productForm) {
3232
}
3333

3434
@ApiOperation(value = "删除产品", notes = "根据url的id来指定删除对象")
35-
@ApiImplicitParam(paramType = "path", name = "id", value = "产品ID", required = true, dataType = "long")
35+
@ApiImplicitParam(paramType = "path", name = "id", value = "产品ID", required = true, dataType = "string")
3636
@DeleteMapping(value = "/{id}")
3737
public Result delete(@PathVariable String id) {
3838
return Result.success(productService.delete(id));
3939
}
4040

4141
@ApiOperation(value = "修改产品", notes = "修改指定产品信息")
4242
@ApiImplicitParams({
43-
@ApiImplicitParam(name = "id", value = "产品ID", required = true, dataType = "long"),
43+
@ApiImplicitParam(name = "id", value = "产品ID", required = true, dataType = "string"),
4444
@ApiImplicitParam(name = "productForm", value = "产品实体", required = true, dataType = "ProductForm")
4545
})
4646
@PutMapping(value = "/{id}")
@@ -51,7 +51,7 @@ public Result update(@PathVariable String id, @Valid @RequestBody ProductForm pr
5151
}
5252

5353
@ApiOperation(value = "获取产品", notes = "获取指定产品信息")
54-
@ApiImplicitParam(paramType = "path", name = "id", value = "产品ID", required = true, dataType = "long")
54+
@ApiImplicitParam(paramType = "path", name = "id", value = "产品ID", required = true, dataType = "string")
5555
@GetMapping(value = "/{id}")
5656
public Result get(@PathVariable String id) {
5757
log.info("get with id:{}", id);

‎gateway/gateway-admin/src/main/java/com/springboot/cloud/gateway/admin/rest/GatewayRouteController.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@ public Result add(@Valid @RequestBody GatewayRouteForm gatewayRoutForm) {
3333
}
3434

3535
@ApiOperation(value = "删除网关路由", notes = "根据url的id来指定删除对象")
36-
@ApiImplicitParam(paramType = "path", name = "id", value = "网关路由ID", required = true, dataType = "long")
36+
@ApiImplicitParam(paramType = "path", name = "id", value = "网关路由ID", required = true, dataType = "string")
3737
@DeleteMapping(value = "/{id}")
3838
public Result delete(@PathVariable String id) {
3939
return Result.success(gatewayRoutService.delete(id));
4040
}
4141

4242
@ApiOperation(value = "修改网关路由", notes = "修改指定网关路由信息")
4343
@ApiImplicitParams({
44-
@ApiImplicitParam(name = "id", value = "网关路由ID", required = true, dataType = "long"),
44+
@ApiImplicitParam(name = "id", value = "网关路由ID", required = true, dataType = "string"),
4545
@ApiImplicitParam(name = "gatewayRoutForm", value = "网关路由实体", required = true, dataType = "GatewayRouteForm")
4646
})
4747
@PutMapping(value = "/{id}")
@@ -52,7 +52,7 @@ public Result update(@PathVariable String id, @Valid @RequestBody GatewayRouteFo
5252
}
5353

5454
@ApiOperation(value = "获取网关路由", notes = "根据id获取指定网关路由信息")
55-
@ApiImplicitParam(paramType = "path", name = "id", value = "网关路由ID", required = true, dataType = "long")
55+
@ApiImplicitParam(paramType = "path", name = "id", value = "网关路由ID", required = true, dataType = "string")
5656
@GetMapping(value = "/{id}")
5757
public Result get(@PathVariable String id) {
5858
log.info("get with id:{}", id);

0 commit comments

Comments
 (0)