Update cluster API documentation

This commit is contained in:
Ingo Oppermann
2023-06-22 16:21:13 +02:00
parent e5f0b3a57f
commit faf0aab53a
3 changed files with 290 additions and 0 deletions

View File

@@ -267,6 +267,104 @@ const docTemplateClusterAPI = `{
}
}
},
"/v1/kv": {
"post": {
"description": "Store value under key",
"produces": [
"application/json"
],
"tags": [
"v1.0.0"
],
"summary": "Store value under key",
"operationId": "cluster-1-kv-set",
"parameters": [
{
"description": "Set KV request",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/client.SetKVRequest"
}
},
{
"type": "string",
"description": "Origin ID of request",
"name": "X-Cluster-Origin",
"in": "header"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "string"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/cluster.Error"
}
},
"508": {
"description": "Loop Detected",
"schema": {
"$ref": "#/definitions/cluster.Error"
}
}
}
}
},
"/v1/kv/{key}": {
"delete": {
"description": "Removes a key",
"produces": [
"application/json"
],
"tags": [
"v1.0.0"
],
"summary": "Removes a key",
"operationId": "cluster-1-kv-unset",
"parameters": [
{
"type": "string",
"description": "Key name",
"name": "name",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Origin ID of request",
"name": "X-Cluster-Origin",
"in": "header"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "string"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/cluster.Error"
}
},
"508": {
"description": "Loop Detected",
"schema": {
"$ref": "#/definitions/cluster.Error"
}
}
}
}
},
"/v1/lock": {
"post": {
"description": "Acquire a named lock",
@@ -916,6 +1014,17 @@ const docTemplateClusterAPI = `{
}
}
},
"client.SetKVRequest": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"client.SetPoliciesRequest": {
"type": "object",
"properties": {

View File

@@ -259,6 +259,104 @@
}
}
},
"/v1/kv": {
"post": {
"description": "Store value under key",
"produces": [
"application/json"
],
"tags": [
"v1.0.0"
],
"summary": "Store value under key",
"operationId": "cluster-1-kv-set",
"parameters": [
{
"description": "Set KV request",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/client.SetKVRequest"
}
},
{
"type": "string",
"description": "Origin ID of request",
"name": "X-Cluster-Origin",
"in": "header"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "string"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/cluster.Error"
}
},
"508": {
"description": "Loop Detected",
"schema": {
"$ref": "#/definitions/cluster.Error"
}
}
}
}
},
"/v1/kv/{key}": {
"delete": {
"description": "Removes a key",
"produces": [
"application/json"
],
"tags": [
"v1.0.0"
],
"summary": "Removes a key",
"operationId": "cluster-1-kv-unset",
"parameters": [
{
"type": "string",
"description": "Key name",
"name": "name",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Origin ID of request",
"name": "X-Cluster-Origin",
"in": "header"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "string"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/cluster.Error"
}
},
"508": {
"description": "Loop Detected",
"schema": {
"$ref": "#/definitions/cluster.Error"
}
}
}
}
},
"/v1/lock": {
"post": {
"description": "Acquire a named lock",
@@ -908,6 +1006,17 @@
}
}
},
"client.SetKVRequest": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"client.SetPoliciesRequest": {
"type": "object",
"properties": {

View File

@@ -118,6 +118,13 @@ definitions:
valid_until:
type: string
type: object
client.SetKVRequest:
properties:
key:
type: string
value:
type: string
type: object
client.SetPoliciesRequest:
properties:
policies:
@@ -383,6 +390,71 @@ paths:
summary: Set identity policies
tags:
- v1.0.0
/v1/kv:
post:
description: Store value under key
operationId: cluster-1-kv-set
parameters:
- description: Set KV request
in: body
name: data
required: true
schema:
$ref: '#/definitions/client.SetKVRequest'
- description: Origin ID of request
in: header
name: X-Cluster-Origin
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
type: string
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/cluster.Error'
"508":
description: Loop Detected
schema:
$ref: '#/definitions/cluster.Error'
summary: Store value under key
tags:
- v1.0.0
/v1/kv/{key}:
delete:
description: Removes a key
operationId: cluster-1-kv-unset
parameters:
- description: Key name
in: path
name: name
required: true
type: string
- description: Origin ID of request
in: header
name: X-Cluster-Origin
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
type: string
"404":
description: Not Found
schema:
$ref: '#/definitions/cluster.Error'
"508":
description: Loop Detected
schema:
$ref: '#/definitions/cluster.Error'
summary: Removes a key
tags:
- v1.0.0
/v1/lock:
post:
description: Acquire a named lock