api: correct openapi def

This commit is contained in:
Xavier Stouder
2025-07-02 20:53:25 +02:00
parent 7bbb3ff9cf
commit 58a96dc687
3 changed files with 74 additions and 85 deletions
+73 -83
View File
@@ -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": []
}
]
}
}
+1 -1
View File
@@ -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,
}
-1
View File
@@ -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")