174 lines
5.3 KiB
JSON
174 lines
5.3 KiB
JSON
{
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"title": "oc-peer",
|
|
"description": "Manage OpenCloud peers\n",
|
|
"version": "1.0.0",
|
|
"termsOfService": "http://cloud.o-forge.io/",
|
|
"contact": {
|
|
"email": "admin@o-cloud.io"
|
|
},
|
|
"license": {
|
|
"name": "AGPL",
|
|
"url": "https://www.gnu.org/licenses/agpl-3.0.html"
|
|
}
|
|
},
|
|
"basePath": "/oc/",
|
|
"paths": {
|
|
"/": {
|
|
"get": {
|
|
"tags": [
|
|
"oc-peer/controllersPeerController"
|
|
],
|
|
"description": "find all peer\n\u003cbr\u003e",
|
|
"operationId": "PeerController.GetAll",
|
|
"responses": {
|
|
"200": {
|
|
"description": "{peer} models.peer"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/search/{search}": {
|
|
"get": {
|
|
"tags": [
|
|
"oc-peer/controllersPeerController"
|
|
],
|
|
"description": "search workspace\n\u003cbr\u003e",
|
|
"operationId": "PeerController.Search",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "search",
|
|
"description": "the word search you want to get",
|
|
"required": true,
|
|
"type": "string"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "{workspace} models.workspace"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/status/": {
|
|
"post": {
|
|
"tags": [
|
|
"status"
|
|
],
|
|
"description": "get peer status if it's alive\n\u003cbr\u003e",
|
|
"operationId": "StatusController.Status",
|
|
"parameters": [
|
|
{
|
|
"in": "body",
|
|
"name": "body",
|
|
"description": "of",
|
|
"schema": {
|
|
"$ref": "#/definitions/list"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "{status} models.status"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/version/": {
|
|
"get": {
|
|
"tags": [
|
|
"version"
|
|
],
|
|
"description": "get version\n\u003cbr\u003e",
|
|
"operationId": "VersionController.GetAll",
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/{id}": {
|
|
"get": {
|
|
"tags": [
|
|
"oc-peer/controllersPeerController"
|
|
],
|
|
"description": "find peer by peerid\n\u003cbr\u003e",
|
|
"operationId": "PeerController.Get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "id",
|
|
"description": "the peer id you want to get",
|
|
"required": true,
|
|
"type": "string"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "{peer} models.peer"
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"oc-peer/controllersPeerController"
|
|
],
|
|
"description": "create peers\n\u003cbr\u003e",
|
|
"operationId": "PeerController.Update",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "id",
|
|
"description": "the peer id you want to get",
|
|
"required": true,
|
|
"type": "string"
|
|
},
|
|
{
|
|
"in": "body",
|
|
"name": "body",
|
|
"description": "The peer content",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/models.peer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "",
|
|
"schema": {
|
|
"$ref": "#/definitions/models.peer"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"list": {
|
|
"title": "list",
|
|
"type": "object"
|
|
},
|
|
"models.peer": {
|
|
"title": "peer",
|
|
"type": "object"
|
|
}
|
|
},
|
|
"tags": [
|
|
{
|
|
"name": "status",
|
|
"description": "Operations about workflow\n"
|
|
},
|
|
{
|
|
"name": "oc-peer/controllersPeerController",
|
|
"description": "Operations about workflow\n"
|
|
},
|
|
{
|
|
"name": "version",
|
|
"description": "VersionController operations for Version\n"
|
|
}
|
|
]
|
|
} |