Lightest nats behaviors, less code
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
},
|
||||
"basePath": "/oc/",
|
||||
"paths": {
|
||||
"/": {
|
||||
"/peer": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"oc-peer/controllersPeerController"
|
||||
@@ -37,59 +37,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/distributed/search/{search}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"distributed"
|
||||
],
|
||||
"description": "search workspace\n\u003cbr\u003e",
|
||||
"operationId": "DistributedPeerController.Search",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "search",
|
||||
"description": "the word search you want to get",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"in": "query",
|
||||
"name": "is_draft",
|
||||
"description": "false",
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{workspace} models.workspace"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/distributed/{name}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"distributed"
|
||||
],
|
||||
"description": "find peer by peerid\n\u003cbr\u003e",
|
||||
"operationId": "DistributedPeerController.Get",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "id",
|
||||
"description": "the peer id you want to get",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{peer} models.peer"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/search/{search}": {
|
||||
"/peer/search/{search}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"oc-peer/controllersPeerController"
|
||||
@@ -118,6 +66,144 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/peer/{from}/link/{relation}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"oc-peer/controllersPeerController"
|
||||
],
|
||||
"description": "find peer by peerid\n\u003cbr\u003e",
|
||||
"operationId": "PeerController.Link",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "id",
|
||||
"description": "the peer id you want to get",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{peer} models.peer"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/peer/{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"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/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"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/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 blacklist",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{peer} models.peer"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/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"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/peer/{id}/unknown": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"oc-peer/controllersPeerController"
|
||||
],
|
||||
"description": "add unknown peer by peerid\n\u003cbr\u003e",
|
||||
"operationId": "PeerController.unknown",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "id",
|
||||
"description": "the peer id you want to blacklist",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{peer} models.peer"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/status/": {
|
||||
"post": {
|
||||
"tags": [
|
||||
@@ -155,141 +241,12 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/{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": [
|
||||
@@ -301,10 +258,6 @@
|
||||
"name": "oc-peer/controllersPeerController",
|
||||
"description": "Operations about workflow\n"
|
||||
},
|
||||
{
|
||||
"name": "distributed",
|
||||
"description": "Operations about workflow\n"
|
||||
},
|
||||
{
|
||||
"name": "version",
|
||||
"description": "VersionController operations for Version\n"
|
||||
|
||||
Reference in New Issue
Block a user