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"
|
||||
|
||||
@@ -12,7 +12,7 @@ info:
|
||||
url: https://www.gnu.org/licenses/agpl-3.0.html
|
||||
basePath: /oc/
|
||||
paths:
|
||||
/:
|
||||
/peer:
|
||||
get:
|
||||
tags:
|
||||
- oc-peer/controllersPeerController
|
||||
@@ -28,7 +28,24 @@ paths:
|
||||
responses:
|
||||
"200":
|
||||
description: '{peer} models.peer'
|
||||
/{id}:
|
||||
/peer/{from}/link/{relation}:
|
||||
get:
|
||||
tags:
|
||||
- oc-peer/controllersPeerController
|
||||
description: |-
|
||||
find peer by peerid
|
||||
<br>
|
||||
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
|
||||
@@ -45,31 +62,7 @@ paths:
|
||||
responses:
|
||||
"200":
|
||||
description: '{peer} models.peer'
|
||||
put:
|
||||
tags:
|
||||
- oc-peer/controllersPeerController
|
||||
description: |-
|
||||
create peers
|
||||
<br>
|
||||
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:
|
||||
/peer/{id}/blacklist:
|
||||
post:
|
||||
tags:
|
||||
- oc-peer/controllersPeerController
|
||||
@@ -86,7 +79,7 @@ paths:
|
||||
responses:
|
||||
"200":
|
||||
description: '{peer} models.peer'
|
||||
/{id}/partner:
|
||||
/peer/{id}/partner:
|
||||
post:
|
||||
tags:
|
||||
- oc-peer/controllersPeerController
|
||||
@@ -97,13 +90,13 @@ paths:
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
description: the peer id you want to partner
|
||||
description: the peer id you want to blacklist
|
||||
required: true
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
description: '{peer} models.peer'
|
||||
/{id}/undo_state:
|
||||
/peer/{id}/undo_state:
|
||||
post:
|
||||
tags:
|
||||
- oc-peer/controllersPeerController
|
||||
@@ -120,45 +113,24 @@ paths:
|
||||
responses:
|
||||
"200":
|
||||
description: '{peer} models.peer'
|
||||
/distributed/{name}:
|
||||
get:
|
||||
/peer/{id}/unknown:
|
||||
post:
|
||||
tags:
|
||||
- distributed
|
||||
- oc-peer/controllersPeerController
|
||||
description: |-
|
||||
find peer by peerid
|
||||
add unknown peer by peerid
|
||||
<br>
|
||||
operationId: DistributedPeerController.Get
|
||||
operationId: PeerController.unknown
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
description: the peer id you want to get
|
||||
description: the peer id you want to blacklist
|
||||
required: true
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
description: '{peer} models.peer'
|
||||
/distributed/search/{search}:
|
||||
get:
|
||||
tags:
|
||||
- distributed
|
||||
description: |-
|
||||
search workspace
|
||||
<br>
|
||||
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'
|
||||
/search/{search}:
|
||||
/peer/search/{search}:
|
||||
get:
|
||||
tags:
|
||||
- oc-peer/controllersPeerController
|
||||
@@ -211,9 +183,6 @@ definitions:
|
||||
list:
|
||||
title: list
|
||||
type: object
|
||||
models.peer:
|
||||
title: peer
|
||||
type: object
|
||||
tags:
|
||||
- name: status
|
||||
description: |
|
||||
@@ -221,9 +190,6 @@ tags:
|
||||
- name: oc-peer/controllersPeerController
|
||||
description: |
|
||||
Operations about workflow
|
||||
- name: distributed
|
||||
description: |
|
||||
Operations about workflow
|
||||
- name: version
|
||||
description: |
|
||||
VersionController operations for Version
|
||||
|
||||
Reference in New Issue
Block a user