Skip to content

Commit

Permalink
remove whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
korotkov-aerospike committed Aug 1, 2024
1 parent 1571107 commit 66a871f
Show file tree
Hide file tree
Showing 4 changed files with 111 additions and 2 deletions.
39 changes: 39 additions & 0 deletions docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,45 @@ const docTemplate = `{
}
}
},
"put": {
"consumes": [
"application/json"
],
"tags": [
"Configuration"
],
"summary": "Updates an existing Aerospike cluster in the configuration.",
"operationId": "updateCluster",
"parameters": [
{
"type": "string",
"description": "Aerospike cluster name",
"name": "name",
"in": "path",
"required": true
},
{
"description": "Aerospike cluster details",
"name": "cluster",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/model.AerospikeCluster"
}
}
],
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Bad Request",
"schema": {
"type": "string"
}
}
}
},
"post": {
"consumes": [
"application/json"
Expand Down
42 changes: 42 additions & 0 deletions docs/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,48 @@
"summary" : "Adds an Aerospike cluster to the config.",
"tags" : [ "Configuration" ],
"x-codegen-request-body-name" : "cluster"
},
"put" : {
"operationId" : "updateCluster",
"parameters" : [ {
"description" : "Aerospike cluster name",
"in" : "path",
"name" : "name",
"required" : true,
"schema" : {
"type" : "string"
}
} ],
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/model.AerospikeCluster"
}
}
},
"description" : "Aerospike cluster details",
"required" : true
},
"responses" : {
"200" : {
"content" : { },
"description" : "OK"
},
"400" : {
"content" : {
"*/*" : {
"schema" : {
"type" : "string"
}
}
},
"description" : "Bad Request"
}
},
"summary" : "Updates an existing Aerospike cluster in the configuration.",
"tags" : [ "Configuration" ],
"x-codegen-request-body-name" : "cluster"
}
},
"/v1/config/policies" : {
Expand Down
30 changes: 30 additions & 0 deletions docs/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,36 @@ paths:
tags:
- Configuration
x-codegen-request-body-name: cluster
put:
operationId: updateCluster
parameters:
- description: Aerospike cluster name
in: path
name: name
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/model.AerospikeCluster'
description: Aerospike cluster details
required: true
responses:
"200":
content: {}
description: OK
"400":
content:
'*/*':
schema:
type: string
description: Bad Request
summary: Updates an existing Aerospike cluster in the configuration.
tags:
- Configuration
x-codegen-request-body-name: cluster
/v1/config/policies:
get:
operationId: readPolicies
Expand Down
2 changes: 0 additions & 2 deletions internal/server/config_cluster_handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,6 @@ func (ws *HTTPServer) readAerospikeCluster(w http.ResponseWriter, r *http.Reques
// @Param cluster body model.AerospikeCluster true "Aerospike cluster details"
// @Success 200
// @Failure 400 {string} string
//

func (ws *HTTPServer) updateAerospikeCluster(w http.ResponseWriter, r *http.Request) {
var updatedCluster model.AerospikeCluster
err := json.NewDecoder(r.Body).Decode(&updatedCluster)
Expand Down

0 comments on commit 66a871f

Please sign in to comment.