diff --git a/controllers/shared_workspace.go b/controllers/shared_workspace.go index 55470ef..4a074c2 100644 --- a/controllers/shared_workspace.go +++ b/controllers/shared_workspace.go @@ -167,12 +167,12 @@ func (o *SharedWorkspaceController) AddPeer() { o.ServeJSON() } -// @Title Add Peer +// @Title Add Rule // @Description find shared workspace by id // @Param id path string true "the id you want to get" // @Param id2 path string true "the id you want to add" // @Success 200 {shared workspace} models.shared_workspace -// @router /:id/peer/:id2 [post] +// @router /:id/rule/:id2 [post] func (o *SharedWorkspaceController) AddRule() { var res map[string]interface{} id := o.Ctx.Input.Param(":id") diff --git a/oc-shared b/oc-shared index 4a11b67..5d2e7c4 100755 Binary files a/oc-shared and b/oc-shared differ diff --git a/routers/commentsRouter.go b/routers/commentsRouter.go index 84d03b9..7fa67eb 100644 --- a/routers/commentsRouter.go +++ b/routers/commentsRouter.go @@ -118,7 +118,7 @@ func init() { beego.GlobalControllerRouter["oc-shared/controllers:SharedWorkspaceController"] = append(beego.GlobalControllerRouter["oc-shared/controllers:SharedWorkspaceController"], beego.ControllerComments{ Method: "AddRule", - Router: `/:id/peer/:id2`, + Router: `/:id/rule/:id2`, AllowHTTPMethods: []string{"post"}, MethodParams: param.Make(), Filters: nil, diff --git a/swagger/swagger.json b/swagger/swagger.json index 3f9127f..d86c19a 100644 --- a/swagger/swagger.json +++ b/swagger/swagger.json @@ -313,6 +313,36 @@ } } }, + "/shared/workspace/{id}/rule/{id2}": { + "post": { + "tags": [ + "shared/workspace" + ], + "description": "find shared workspace by id\n\u003cbr\u003e", + "operationId": "SharedWorkspaceController.Add Rule", + "parameters": [ + { + "in": "path", + "name": "id", + "description": "the id you want to get", + "required": true, + "type": "string" + }, + { + "in": "path", + "name": "id2", + "description": "the id you want to add", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "{shared workspace} models.shared_workspace" + } + } + } + }, "/shared/workspace/{id}/workflow/{id2}": { "post": { "tags": [ diff --git a/swagger/swagger.yml b/swagger/swagger.yml index 334094c..9ddcf0c 100644 --- a/swagger/swagger.yml +++ b/swagger/swagger.yml @@ -117,6 +117,28 @@ paths: responses: "200": description: '{shared workspace} models.shared_workspace' + /shared/workspace/{id}/rule/{id2}: + post: + tags: + - shared/workspace + description: |- + find shared workspace by id +
+ operationId: SharedWorkspaceController.Add Rule + parameters: + - in: path + name: id + description: the id you want to get + required: true + type: string + - in: path + name: id2 + description: the id you want to add + required: true + type: string + responses: + "200": + description: '{shared workspace} models.shared_workspace' /shared/workspace/{id}/workflow/{id2}: post: tags: