oc-peer/swagger/swagger.json
2024-10-15 16:55:29 +02:00

243 lines
7.7 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"
}
}
}
}
},
"/{id}/blacklist": {
"post": {
"tags": [
"oc-peer/controllersPeerController"
],
"description": "add blacklist peer by peerid\n\u003cbr\u003e",
"operationId": "PeerController.Blacklist",
"parameters": [
{
"in": "path",
"name": "id",
"description": "the peer id you want to blacklist",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "{peer} models.peer"
}
}
}
},
"/{id}/partner": {
"post": {
"tags": [
"oc-peer/controllersPeerController"
],
"description": "add partner peer by peerid\n\u003cbr\u003e",
"operationId": "PeerController.Partner",
"parameters": [
{
"in": "path",
"name": "id",
"description": "the peer id you want to partner",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "{peer} models.peer"
}
}
}
},
"/{id}/undo_state": {
"post": {
"tags": [
"oc-peer/controllersPeerController"
],
"description": "delete state peer by peerid\n\u003cbr\u003e",
"operationId": "PeerController.DeleteState",
"parameters": [
{
"in": "path",
"name": "id",
"description": "the peer id you want to delete state",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "{peer} 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"
}
]
}