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": {