diff --git a/doc/api/garage-admin-v2.json b/doc/api/garage-admin-v2.json index 520bf17a..5c26aa84 100644 --- a/doc/api/garage-admin-v2.json +++ b/doc/api/garage-admin-v2.json @@ -869,40 +869,6 @@ } } }, - "/v2/IntrospectAdminToken": { - "get": { - "tags": [ - "Admin API token" - ], - "description": "\nReturn information about the calling admin API token.\n ", - "operationId": "IntrospectAdminToken", - "parameters": [ - { - "name": "admin_token", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Information about the admin token", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IntrospectAdminTokenResponse" - } - } - } - }, - "500": { - "description": "Internal server error" - } - } - } - }, "/v2/GetNodeInfo": { "get": { "tags": [ @@ -1142,6 +1108,30 @@ } } }, + "/v2/IntrospectAdminToken": { + "get": { + "tags": [ + "Admin API token" + ], + "description": "\nReturn information about the calling admin API token.\n ", + "operationId": "IntrospectAdminToken", + "responses": { + "200": { + "description": "Information about the admin token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IntrospectAdminTokenResponse" + } + } + } + }, + "500": { + "description": "Internal server error" + } + } + } + }, "/v2/LaunchRepairOperation": { "post": { "tags": [ @@ -2678,54 +2668,6 @@ } } }, - "IntrospectAdminTokenResponse": { - "type": "object", - "required": [ - "name", - "expired", - "scope" - ], - "properties": { - "created": { - "type": [ - "string", - "null" - ], - "format": "date-time", - "description": "Creation date" - }, - "expiration": { - "type": [ - "string", - "null" - ], - "format": "date-time", - "description": "Expiration time and date, formatted according to RFC 3339" - }, - "expired": { - "type": "boolean", - "description": "Whether this admin token is expired already" - }, - "id": { - "type": [ - "string", - "null" - ], - "description": "Identifier of the admin token (which is also a prefix of the full bearer token)" - }, - "name": { - "type": "string", - "description": "Name of the admin API token" - }, - "scope": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Scope of the admin API token, a list of admin endpoint names (such as\n`GetClusterStatus`, etc), or the special value `*` to allow all\nadmin endpoints" - } - } - }, "ImportKeyRequest": { "type": "object", "required": [ @@ -2890,6 +2832,54 @@ } } }, + "IntrospectAdminTokenResponse": { + "type": "object", + "required": [ + "name", + "expired", + "scope" + ], + "properties": { + "created": { + "type": [ + "string", + "null" + ], + "format": "date-time", + "description": "Creation date" + }, + "expiration": { + "type": [ + "string", + "null" + ], + "format": "date-time", + "description": "Expiration time and date, formatted according to RFC 3339" + }, + "expired": { + "type": "boolean", + "description": "Whether this admin token is expired already" + }, + "id": { + "type": [ + "string", + "null" + ], + "description": "Identifier of the admin token (which is also a prefix of the full bearer token)" + }, + "name": { + "type": "string", + "description": "Name of the admin API token" + }, + "scope": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Scope of the admin API token, a list of admin endpoint names (such as\n`GetClusterStatus`, etc), or the special value `*` to allow all\nadmin endpoints" + } + } + }, "KeyInfoBucketResponse": { "type": "object", "required": [ @@ -4464,4 +4454,4 @@ "bearerAuth": [] } ] -} +} \ No newline at end of file diff --git a/src/api/admin/api.rs b/src/api/admin/api.rs index d1322b79..7ad2c652 100644 --- a/src/api/admin/api.rs +++ b/src/api/admin/api.rs @@ -392,7 +392,7 @@ pub struct DeleteAdminTokenRequest { #[derive(Debug, Clone, Serialize, Deserialize)] pub struct DeleteAdminTokenResponse; -#[derive(Debug, Clone, Serialize, Deserialize, IntoParams)] +#[derive(Debug, Clone, Serialize, Deserialize)] pub struct IntrospectAdminTokenRequest { pub admin_token: String, } diff --git a/src/api/admin/openapi.rs b/src/api/admin/openapi.rs index 47ec035a..09780fa0 100644 --- a/src/api/admin/openapi.rs +++ b/src/api/admin/openapi.rs @@ -197,7 +197,6 @@ fn DeleteAdminToken() -> () {} description = " Return information about the calling admin API token. ", - params(IntrospectAdminTokenRequest), responses( (status = 200, description = "Information about the admin token", body = IntrospectAdminTokenResponse), (status = 500, description = "Internal server error")