|
|
@@ -13,6 +13,7 @@ import com.zhongshu.opengateway.client.model.param.OpenApiSearchParam;
|
|
|
import com.zhongshu.opengateway.client.model.ret.ResultContent;
|
|
|
import com.zhongshu.opengateway.client.service.OpenApiConfigService;
|
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
|
+import io.swagger.v3.oas.annotations.Parameter;
|
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
@@ -42,60 +43,61 @@ public class OpenApiConfigManagerController {
|
|
|
// return openApiConfigManagerService.pageAll(appId, pageable);
|
|
|
// }
|
|
|
|
|
|
- @Operation(summary = "添加应用", description = "添加应用")
|
|
|
- @ResourceAuth(value = AuthConstant.SuperAdmin, type = AuthType.Platform, remark = "")
|
|
|
- @ResourceAuth(value = "openapi", type = AuthType.Project, remark = "")
|
|
|
- @RequestMapping(value = "quoteOpenApi", method = RequestMethod.POST, consumes = {MediaType.ALL_VALUE})
|
|
|
- public ResultContent quoteOpenApi(@RequestBody AddApiParam param){
|
|
|
- return openApiConfigManagerService.quoteOpenApi(param);
|
|
|
- }
|
|
|
+// @Operation(summary = "添加接口", description = "添加接口")
|
|
|
+//// @ResourceAuth(value = AuthConstant.SuperAdmin, type = AuthType.Platform, remark = "")
|
|
|
+//// @ResourceAuth(value = "openapi", type = AuthType.Project, remark = "")
|
|
|
+// @RequestMapping(value = "quoteOpenApi", method = RequestMethod.POST)
|
|
|
+// public ResultContent quoteOpenApi(@RequestBody AddApiParam param){
|
|
|
+// return openApiConfigManagerService.quoteOpenApi(param);
|
|
|
+// }
|
|
|
|
|
|
|
|
|
@Operation(summary = "分页查询App下openApi", description = "分页查询App下openApi")
|
|
|
- @ResourceAuth(value = AuthConstant.SuperAdmin, type = AuthType.Platform, remark = "")
|
|
|
- @ResourceAuth(value = "openapi", type = AuthType.Project, remark = "")
|
|
|
- @RequestMapping(value = "pageByApp", method = RequestMethod.POST, consumes = {MediaType.ALL_VALUE})
|
|
|
- public ResultContent pageByApp(@RequestBody OpenApiSearchParam param){
|
|
|
+// @ResourceAuth(value = AuthConstant.SuperAdmin, type = AuthType.Platform, remark = "")
|
|
|
+// @ResourceAuth(value = "openapi", type = AuthType.Project, remark = "")
|
|
|
+ @RequestMapping(value = "pageByApp", method = RequestMethod.POST)
|
|
|
+ public ResultContent pageByApp(Pageable pageable, OpenApiSearchParam param){
|
|
|
+ param.setPage(param.getPage());
|
|
|
+ param.setSize(param.getSize());
|
|
|
return openApiConfigManagerService.pageByApp(param);
|
|
|
}
|
|
|
+// @Operation(summary = "分页查询App添加列表", description = "分页查询App下openApi")
|
|
|
+//// @ResourceAuth(value = AuthConstant.SuperAdmin, type = AuthType.Platform, remark = "")
|
|
|
+//// @ResourceAuth(value = "openapi", type = AuthType.Project, remark = "")
|
|
|
+// @RequestMapping(value = "pageAddList", method = RequestMethod.POST)
|
|
|
+// public ResultContent pageAddList(@RequestBody OpenApiSearchParam param){
|
|
|
+// return openApiConfigManagerService.pageAddList(param);
|
|
|
+// }
|
|
|
|
|
|
- @Operation(summary = "分页查询App添加列表", description = "分页查询App下openApi")
|
|
|
- @ResourceAuth(value = AuthConstant.SuperAdmin, type = AuthType.Platform, remark = "")
|
|
|
- @ResourceAuth(value = "openapi", type = AuthType.Project, remark = "")
|
|
|
- @RequestMapping(value = "pageAddList", method = RequestMethod.POST, consumes = {MediaType.ALL_VALUE})
|
|
|
- public ResultContent pageAddList(@RequestBody OpenApiSearchParam param){
|
|
|
- return openApiConfigManagerService.pageAddList(param);
|
|
|
- }
|
|
|
-
|
|
|
- @Operation(summary = "禁用/启用", description = "禁用/启用")
|
|
|
- @ResourceAuth(value = AuthConstant.SuperAdmin, type = AuthType.Platform, remark = "")
|
|
|
- @ResourceAuth(value = "openapi", type = AuthType.Project, remark = "")
|
|
|
- @RequestMapping(value = "disable", method = RequestMethod.POST, consumes = {MediaType.ALL_VALUE})
|
|
|
- public ResultContent disable(String id){
|
|
|
- return openApiConfigManagerService.disable(id);
|
|
|
- }
|
|
|
-
|
|
|
- @Operation(summary = "删除", description = "删除")
|
|
|
- @ResourceAuth(value = AuthConstant.SuperAdmin, type = AuthType.Platform, remark = "")
|
|
|
- @ResourceAuth(value = "openapi", type = AuthType.Project, remark = "")
|
|
|
- @RequestMapping(value = "delete", method = RequestMethod.POST, consumes = {MediaType.ALL_VALUE})
|
|
|
- public ResultContent delete(String id){
|
|
|
- return openApiConfigManagerService.delete(id);
|
|
|
- }
|
|
|
-
|
|
|
- @Operation(summary = " 获取openApi详情", description = " 获取openApi详情")
|
|
|
- @ResourceAuth(value = AuthConstant.SuperAdmin, type = AuthType.Platform, remark = "")
|
|
|
- @ResourceAuth(value = "openapi", type = AuthType.Project, remark = "")
|
|
|
- @RequestMapping(value = "get", method = RequestMethod.POST, consumes = {MediaType.ALL_VALUE})
|
|
|
- public ResultContent get(String id){
|
|
|
- return openApiConfigManagerService.get(id);
|
|
|
- }
|
|
|
-
|
|
|
- @Operation(summary = "设置限流规则", description = "设置限流规则")
|
|
|
- @ResourceAuth(value = AuthConstant.SuperAdmin, type = AuthType.Platform, remark = "")
|
|
|
- @ResourceAuth(value = "openapi", type = AuthType.Project, remark = "")
|
|
|
- @RequestMapping(value = "setLimit", method = RequestMethod.POST, consumes = {MediaType.ALL_VALUE})
|
|
|
- public ResultContent setLimit(@RequestBody LimitParam limitParam){
|
|
|
- return openApiConfigManagerService.setLimit(limitParam);
|
|
|
- }
|
|
|
+// @Operation(summary = "禁用/启用", description = "禁用/启用")
|
|
|
+//// @ResourceAuth(value = AuthConstant.SuperAdmin, type = AuthType.Platform, remark = "")
|
|
|
+//// @ResourceAuth(value = "openapi", type = AuthType.Project, remark = "")
|
|
|
+// @RequestMapping(value = "disable", method = RequestMethod.GET)
|
|
|
+// public ResultContent disable(@Parameter(name = "id", description = "接口id") @RequestParam(value = "id") String id){
|
|
|
+// return openApiConfigManagerService.disable(id);
|
|
|
+// }
|
|
|
+//
|
|
|
+// @Operation(summary = "删除", description = "删除")
|
|
|
+//// @ResourceAuth(value = AuthConstant.SuperAdmin, type = AuthType.Platform, remark = "")
|
|
|
+//// @ResourceAuth(value = "openapi", type = AuthType.Project, remark = "")
|
|
|
+// @RequestMapping(value = "delete", method = RequestMethod.GET)
|
|
|
+// public ResultContent delete(@Parameter(name = "id", description = "接口id") @RequestParam(name = "id") String id){
|
|
|
+// return openApiConfigManagerService.delete(id);
|
|
|
+// }
|
|
|
+//
|
|
|
+// @Operation(summary = " 获取openApi详情", description = " 获取openApi详情")
|
|
|
+//// @ResourceAuth(value = AuthConstant.SuperAdmin, type = AuthType.Platform, remark = "")
|
|
|
+//// @ResourceAuth(value = "openapi", type = AuthType.Project, remark = "")
|
|
|
+// @RequestMapping(value = "get", method = RequestMethod.GET)
|
|
|
+// public ResultContent get(@Parameter(name = "id", description = "接口id") @RequestParam(name = "id") String id){
|
|
|
+// return openApiConfigManagerService.get(id);
|
|
|
+// }
|
|
|
+//
|
|
|
+// @Operation(summary = "设置限流规则", description = "设置限流规则")
|
|
|
+//// @ResourceAuth(value = AuthConstant.SuperAdmin, type = AuthType.Platform, remark = "")
|
|
|
+//// @ResourceAuth(value = "openapi", type = AuthType.Project, remark = "")
|
|
|
+// @RequestMapping(value = "setLimit", method = RequestMethod.POST)
|
|
|
+// public ResultContent setLimit(@RequestBody LimitParam limitParam){
|
|
|
+// return openApiConfigManagerService.setLimit(limitParam);
|
|
|
+// }
|
|
|
}
|