Merge pull request 'openapi spec: add missing datatypes for path parameters' (#1071) from fix-openapi-params into main-v2

Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/1071
This commit is contained in:
Alex
2025-06-14 15:37:26 +00:00
2 changed files with 95 additions and 38 deletions
+76 -19
View File
@@ -33,7 +33,10 @@
"name": "domain",
"in": "path",
"description": "The domain name to check for",
"required": true
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
@@ -407,7 +410,10 @@
"name": "node",
"in": "path",
"description": "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request",
"required": true
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
@@ -439,7 +445,10 @@
"name": "id",
"in": "path",
"description": "Admin API token ID",
"required": true
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
@@ -464,7 +473,10 @@
"name": "id",
"in": "path",
"description": "ID of the bucket to delete",
"required": true
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
@@ -495,7 +507,10 @@
"name": "id",
"in": "path",
"description": "Access key ID",
"required": true
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
@@ -604,7 +619,10 @@
"name": "node",
"in": "path",
"description": "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request",
"required": true
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
@@ -884,7 +902,10 @@
"name": "node",
"in": "path",
"description": "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request",
"required": true
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
@@ -916,7 +937,10 @@
"name": "node",
"in": "path",
"description": "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request",
"required": true
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
@@ -948,7 +972,10 @@
"name": "node",
"in": "path",
"description": "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request",
"required": true
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
@@ -990,7 +1017,10 @@
"name": "node",
"in": "path",
"description": "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request",
"required": true
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
@@ -1111,7 +1141,10 @@
"name": "node",
"in": "path",
"description": "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request",
"required": true
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
@@ -1177,7 +1210,10 @@
"name": "node",
"in": "path",
"description": "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request",
"required": true
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
@@ -1257,7 +1293,10 @@
"name": "node",
"in": "path",
"description": "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request",
"required": true
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
@@ -1323,7 +1362,10 @@
"name": "node",
"in": "path",
"description": "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request",
"required": true
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
@@ -1399,7 +1441,10 @@
"name": "node",
"in": "path",
"description": "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request",
"required": true
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
@@ -1465,7 +1510,10 @@
"name": "node",
"in": "path",
"description": "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request",
"required": true
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
@@ -1507,7 +1555,10 @@
"name": "id",
"in": "path",
"description": "Admin API token ID",
"required": true
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
@@ -1549,7 +1600,10 @@
"name": "id",
"in": "path",
"description": "ID of the bucket to update",
"required": true
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
@@ -1629,7 +1683,10 @@
"name": "id",
"in": "path",
"description": "Access key ID",
"required": true
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
+19 -19
View File
@@ -47,7 +47,7 @@ as Caddy or Tricot, to avoid requesting TLS certificates for domain names that
do not correspond to an actual website.
",
params(
("domain", description = "The domain name to check for"),
("domain" = String, description = "The domain name to check for"),
),
security(()),
responses(
@@ -168,7 +168,7 @@ Updates information about the specified admin API token.
",
request_body = UpdateAdminTokenRequestBody,
params(
("id", description = "Admin API token ID"),
("id" = String, description = "Admin API token ID"),
),
responses(
(status = 200, description = "Admin token has been updated", body = UpdateAdminTokenResponse),
@@ -182,7 +182,7 @@ fn UpdateAdminToken() -> () {}
tag = "Admin API token",
description = "Delete an admin API token from the cluster, revoking all its permissions.",
params(
("id", description = "Admin API token ID"),
("id" = String, description = "Admin API token ID"),
),
responses(
(status = 200, description = "Admin token has been deleted"),
@@ -379,7 +379,7 @@ Updates information about the specified API access key.
",
request_body = UpdateKeyRequestBody,
params(
("id", description = "Access key ID"),
("id" = String, description = "Access key ID"),
),
responses(
(status = 200, description = "Access key has been updated", body = UpdateKeyResponse),
@@ -393,7 +393,7 @@ fn UpdateKey() -> () {}
tag = "Access key",
description = "Delete a key from the cluster. Its access will be removed from all the buckets. Buckets are not automatically deleted and can be dangling. You should manually delete them before. ",
params(
("id", description = "Access key ID"),
("id" = String, description = "Access key ID"),
),
responses(
(status = 200, description = "Access key has been deleted"),
@@ -466,7 +466,7 @@ to remove the quotas. An absent value will be considered the same as a `null`. I
to change only one of the two quotas.
",
params(
("id", description = "ID of the bucket to update"),
("id" = String, description = "ID of the bucket to update"),
),
request_body = UpdateBucketRequestBody,
responses(
@@ -486,7 +486,7 @@ Deletes a storage bucket. A bucket cannot be deleted if it is not empty.
**Warning:** this will delete all aliases associated with the bucket!
",
params(
("id", description = "ID of the bucket to delete"),
("id" = String, description = "ID of the bucket to delete"),
),
responses(
(status = 200, description = "Bucket has been deleted"),
@@ -618,7 +618,7 @@ fn RemoveBucketAlias() -> () {}
Return information about the Garage daemon running on one or several nodes.
",
params(
("node", description = "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request"),
("node" = String, description = "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request"),
),
responses(
(status = 200, description = "Responses from individual cluster nodes", body = MultiResponse<LocalGetNodeInfoResponse>),
@@ -636,7 +636,7 @@ Fetch statistics for one or several Garage nodes.
*Note: do not try to parse the `freeform` field of the response, it is given as a string specifically because its format is not stable.*
",
params(
("node", description = "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request"),
("node" = String, description = "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request"),
),
responses(
(status = 200, description = "Responses from individual cluster nodes", body = MultiResponse<LocalGetNodeStatisticsResponse>),
@@ -652,7 +652,7 @@ fn GetNodeStatistics() -> () {}
Instruct one or several nodes to take a snapshot of their metadata databases.
",
params(
("node", description = "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request"),
("node" = String, description = "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request"),
),
responses(
(status = 200, description = "Responses from individual cluster nodes", body = MultiResponse<LocalCreateMetadataSnapshotResponse>),
@@ -668,7 +668,7 @@ fn CreateMetadataSnapshot() -> () {}
Launch a repair operation on one or several cluster nodes.
",
params(
("node", description = "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request"),
("node" = String, description = "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request"),
),
request_body = LocalLaunchRepairOperationRequest,
responses(
@@ -689,7 +689,7 @@ fn LaunchRepairOperation() -> () {}
List background workers currently running on one or several cluster nodes.
",
params(
("node", description = "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request"),
("node" = String, description = "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request"),
),
request_body = LocalListWorkersRequest,
responses(
@@ -706,7 +706,7 @@ fn ListWorkers() -> () {}
Get information about the specified background worker on one or several cluster nodes.
",
params(
("node", description = "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request"),
("node" = String, description = "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request"),
),
request_body = LocalGetWorkerInfoRequest,
responses(
@@ -723,7 +723,7 @@ fn GetWorkerInfo() -> () {}
Fetch values of one or several worker variables, from one or several cluster nodes.
",
params(
("node", description = "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request"),
("node" = String, description = "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request"),
),
request_body = LocalGetWorkerVariableRequest,
responses(
@@ -740,7 +740,7 @@ fn GetWorkerVariable() -> () {}
Set the value for a worker variable, on one or several cluster nodes.
",
params(
("node", description = "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request"),
("node" = String, description = "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request"),
),
request_body = LocalSetWorkerVariableRequest,
responses(
@@ -761,7 +761,7 @@ fn SetWorkerVariable() -> () {}
List data blocks that are currently in an errored state on one or several Garage nodes.
",
params(
("node", description = "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request"),
("node" = String, description = "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request"),
),
responses(
(status = 200, description = "Responses from individual cluster nodes", body = MultiResponse<LocalListBlockErrorsResponse>),
@@ -777,7 +777,7 @@ fn ListBlockErrors() -> () {}
Get detailed information about a data block stored on a Garage node, including all object versions and in-progress multipart uploads that contain a reference to this block.
",
params(
("node", description = "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request"),
("node" = String, description = "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request"),
),
request_body = LocalGetBlockInfoRequest,
responses(
@@ -794,7 +794,7 @@ fn GetBlockInfo() -> () {}
Instruct Garage node(s) to retry the resynchronization of one or several missing data block(s).
",
params(
("node", description = "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request"),
("node" = String, description = "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request"),
),
request_body = LocalRetryBlockResyncRequest,
responses(
@@ -813,7 +813,7 @@ Purge references to one or several missing data blocks.
This will remove all objects and in-progress multipart uploads that contain the specified data block(s). The objects will be permanently deleted from the buckets in which they appear. Use with caution.
",
params(
("node", description = "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request"),
("node" = String, description = "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request"),
),
request_body = LocalPurgeBlocksRequest,
responses(