mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-08-05 12:27:41 +00:00
openapi: fix query parameters (fix #1160)
This commit is contained in:
+26
-5
@@ -145,6 +145,13 @@ pub struct MultiResponse<RB> {
|
||||
pub error: HashMap<String, String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, IntoParams)]
|
||||
#[into_params(parameter_in = Query)]
|
||||
pub struct MultiRequestQueryParams {
|
||||
/// Node ID to query, or `*` for all nodes, or `self` for the node responding to the request
|
||||
pub node: String,
|
||||
}
|
||||
|
||||
// **********************************************
|
||||
// Special endpoints
|
||||
//
|
||||
@@ -155,8 +162,10 @@ pub struct MultiResponse<RB> {
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct OptionsRequest;
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, IntoParams)]
|
||||
#[into_params(parameter_in = Query)]
|
||||
pub struct CheckDomainRequest {
|
||||
/// The domain name to check for
|
||||
pub domain: String,
|
||||
}
|
||||
|
||||
@@ -355,9 +364,12 @@ pub struct CreateAdminTokenResponse {
|
||||
|
||||
// ---- UpdateAdminToken ----
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, IntoParams)]
|
||||
#[into_params(parameter_in = Query)]
|
||||
pub struct UpdateAdminTokenRequest {
|
||||
/// Admin API token ID
|
||||
pub id: String,
|
||||
#[param(ignore = true)]
|
||||
pub body: UpdateAdminTokenRequestBody,
|
||||
}
|
||||
|
||||
@@ -384,8 +396,10 @@ pub struct UpdateAdminTokenResponse(pub GetAdminTokenInfoResponse);
|
||||
|
||||
// ---- DeleteAdminToken ----
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, IntoParams)]
|
||||
#[into_params(parameter_in = Query)]
|
||||
pub struct DeleteAdminTokenRequest {
|
||||
/// Admin API token ID
|
||||
pub id: String,
|
||||
}
|
||||
|
||||
@@ -736,9 +750,12 @@ pub struct ImportKeyResponse(pub GetKeyInfoResponse);
|
||||
|
||||
// ---- UpdateKey ----
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, IntoParams)]
|
||||
#[into_params(parameter_in = Query)]
|
||||
pub struct UpdateKeyRequest {
|
||||
/// Access key ID
|
||||
pub id: String,
|
||||
#[param(ignore = true)]
|
||||
pub body: UpdateKeyRequestBody,
|
||||
}
|
||||
|
||||
@@ -763,8 +780,10 @@ pub struct UpdateKeyRequestBody {
|
||||
|
||||
// ---- DeleteKey ----
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, IntoParams)]
|
||||
#[into_params(parameter_in = Query)]
|
||||
pub struct DeleteKeyRequest {
|
||||
/// Access key ID
|
||||
pub id: String,
|
||||
}
|
||||
|
||||
@@ -894,6 +913,7 @@ pub struct CreateBucketLocalAlias {
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, IntoParams)]
|
||||
#[into_params(parameter_in = Query)]
|
||||
pub struct UpdateBucketRequest {
|
||||
/// ID of the bucket to update
|
||||
pub id: String,
|
||||
#[param(ignore = true)]
|
||||
pub body: UpdateBucketRequestBody,
|
||||
@@ -922,6 +942,7 @@ pub struct UpdateBucketWebsiteAccess {
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, IntoParams)]
|
||||
#[into_params(parameter_in = Query)]
|
||||
pub struct DeleteBucketRequest {
|
||||
/// ID of the bucket to delete
|
||||
pub id: String,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user