575 lines
20 KiB
JSON
575 lines
20 KiB
JSON
{
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"title": "beego Test API",
|
|
"description": "beego has a very cool tools to autogenerate documents for your API\n",
|
|
"version": "1.0.0",
|
|
"termsOfService": "http://beego.me/",
|
|
"contact": {
|
|
"email": "astaxie@gmail.com"
|
|
},
|
|
"license": {
|
|
"name": "Apache 2.0",
|
|
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
|
|
}
|
|
},
|
|
"basePath": "/oc",
|
|
"paths": {
|
|
"/shared/workspace/": {
|
|
"get": {
|
|
"tags": [
|
|
"shared/workspace"
|
|
],
|
|
"description": "find shared workspace by id\n\u003cbr\u003e",
|
|
"operationId": "SharedWorkspaceController.GetAll",
|
|
"responses": {
|
|
"200": {
|
|
"description": "{shared_workspace} models.shared_workspace"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"shared/workspace"
|
|
],
|
|
"description": "create shared workspace\n\u003cbr\u003e",
|
|
"operationId": "SharedWorkspaceController.Create",
|
|
"parameters": [
|
|
{
|
|
"in": "body",
|
|
"name": "data",
|
|
"description": "body for data content (Json format)",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/json"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "{shared workspace} models.shared_workspace"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/shared/workspace/rule/": {
|
|
"get": {
|
|
"tags": [
|
|
"shared/workspace/rule"
|
|
],
|
|
"description": "find rule by id\n\u003cbr\u003e",
|
|
"operationId": "RuleController.GetAll",
|
|
"responses": {
|
|
"200": {
|
|
"description": "{rule} models.rule"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"shared/workspace/rule"
|
|
],
|
|
"description": "create rule\n\u003cbr\u003e",
|
|
"operationId": "RuleController.Create",
|
|
"parameters": [
|
|
{
|
|
"in": "body",
|
|
"name": "data",
|
|
"description": "body for data content (Json format)",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/json"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "{rule} models.rule"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/shared/workspace/rule/search/{search}": {
|
|
"get": {
|
|
"tags": [
|
|
"shared/workspace/rule"
|
|
],
|
|
"description": "search rule\n\u003cbr\u003e",
|
|
"operationId": "RuleController.Search",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "search",
|
|
"description": "the word search you want to get",
|
|
"required": true,
|
|
"type": "string"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "{rule} models.rule"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/shared/workspace/rule/{id}": {
|
|
"get": {
|
|
"tags": [
|
|
"shared/workspace/rule"
|
|
],
|
|
"description": "find rule by id\n\u003cbr\u003e",
|
|
"operationId": "RuleController.Get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "id",
|
|
"description": "the id you want to get",
|
|
"required": true,
|
|
"type": "string"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "{rule} models.rule"
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"shared/workspace/rule"
|
|
],
|
|
"description": "create rules\n\u003cbr\u003e",
|
|
"operationId": "RuleController.Update",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "id",
|
|
"description": "the rule id you want to get",
|
|
"required": true,
|
|
"type": "string"
|
|
},
|
|
{
|
|
"in": "body",
|
|
"name": "body",
|
|
"description": "The rule content",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/models.rule"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "{rule} models.rule"
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"shared/workspace/rule"
|
|
],
|
|
"description": "delete the rule\n\u003cbr\u003e",
|
|
"operationId": "RuleController.Delete",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "id",
|
|
"description": "The id you want to delete",
|
|
"required": true,
|
|
"type": "string"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "{rule} delete success!"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/shared/workspace/search/{search}": {
|
|
"get": {
|
|
"tags": [
|
|
"shared/workspace"
|
|
],
|
|
"description": "search shared workspace\n\u003cbr\u003e",
|
|
"operationId": "SharedWorkspaceController.Search",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "search",
|
|
"description": "the word search you want to get",
|
|
"required": true,
|
|
"type": "string"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "{shared workspace} models.shared_workspace"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/shared/workspace/{id}": {
|
|
"get": {
|
|
"tags": [
|
|
"shared/workspace"
|
|
],
|
|
"description": "find shared workspace by id\n\u003cbr\u003e",
|
|
"operationId": "SharedWorkspaceController.Get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "id",
|
|
"description": "the id you want to get",
|
|
"required": true,
|
|
"type": "string"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "{shared workspace} models.shared_workspace"
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"shared/workspace"
|
|
],
|
|
"description": "create shared workspaces\n\u003cbr\u003e",
|
|
"operationId": "SharedWorkspaceController.Update",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "id",
|
|
"description": "the shared workspace id you want to get",
|
|
"required": true,
|
|
"type": "string"
|
|
},
|
|
{
|
|
"in": "body",
|
|
"name": "body",
|
|
"description": "The shared workspace content",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/models.workspace"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "{shared workspace} models.shared_workspace"
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"shared/workspace"
|
|
],
|
|
"description": "delete the shared workspace\n\u003cbr\u003e",
|
|
"operationId": "SharedWorkspaceController.Delete",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "id",
|
|
"description": "The id you want to delete",
|
|
"required": true,
|
|
"type": "string"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "{shared workspace} delete success!"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/shared/workspace/{id}/peer/{id2}": {
|
|
"post": {
|
|
"tags": [
|
|
"shared/workspace"
|
|
],
|
|
"description": "find shared workspace by id\n\u003cbr\u003e",
|
|
"operationId": "SharedWorkspaceController.Add Peer",
|
|
"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"
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"shared/workspace"
|
|
],
|
|
"description": "find shared workspace by id\n\u003cbr\u003e",
|
|
"operationId": "SharedWorkspaceController.Remove Peer",
|
|
"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}/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"
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"shared/workspace"
|
|
],
|
|
"description": "find shared workspace by id\n\u003cbr\u003e",
|
|
"operationId": "SharedWorkspaceController.Remove 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": [
|
|
"shared/workspace"
|
|
],
|
|
"description": "find shared workspace by id\n\u003cbr\u003e",
|
|
"operationId": "SharedWorkspaceController.Add Workflow",
|
|
"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"
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"shared/workspace"
|
|
],
|
|
"description": "find shared workspace by id\n\u003cbr\u003e",
|
|
"operationId": "SharedWorkspaceController.Remove Workflow",
|
|
"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}/workspace/{id2}": {
|
|
"post": {
|
|
"tags": [
|
|
"shared/workspace"
|
|
],
|
|
"description": "find shared workspace by id\n\u003cbr\u003e",
|
|
"operationId": "SharedWorkspaceController.Add Workspace",
|
|
"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"
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"shared/workspace"
|
|
],
|
|
"description": "find shared workspace by id\n\u003cbr\u003e",
|
|
"operationId": "SharedWorkspaceController.Add Workspace",
|
|
"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"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/version/": {
|
|
"get": {
|
|
"tags": [
|
|
"version"
|
|
],
|
|
"description": "get version\n\u003cbr\u003e",
|
|
"operationId": "VersionController.GetAll",
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/version/status": {
|
|
"get": {
|
|
"tags": [
|
|
"version"
|
|
],
|
|
"description": "get status\n\u003cbr\u003e",
|
|
"operationId": "VersionController.Status",
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"json": {
|
|
"title": "json",
|
|
"type": "object"
|
|
},
|
|
"models.rule": {
|
|
"title": "rule",
|
|
"type": "object"
|
|
},
|
|
"models.workspace": {
|
|
"title": "workspace",
|
|
"type": "object"
|
|
}
|
|
},
|
|
"tags": [
|
|
{
|
|
"name": "shared/workspace",
|
|
"description": "Operations about workspace\n"
|
|
},
|
|
{
|
|
"name": "shared/workspace/rule",
|
|
"description": "Operations about rule\n"
|
|
},
|
|
{
|
|
"name": "version",
|
|
"description": "VersionController operations for Version\n"
|
|
}
|
|
]
|
|
} |