admin api: specify date-time format in openapi spec
This commit is contained in:
parent
1bd7689301
commit
22c0420607
3 changed files with 3 additions and 3 deletions
|
@ -101,7 +101,7 @@ serde = { version = "1.0", default-features = false, features = ["derive", "rc"]
|
||||||
serde_bytes = "0.11"
|
serde_bytes = "0.11"
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
toml = { version = "0.8", default-features = false, features = ["parse"] }
|
toml = { version = "0.8", default-features = false, features = ["parse"] }
|
||||||
utoipa = "5.3.1"
|
utoipa = { version = "5.3.1", features = ["chrono"] }
|
||||||
|
|
||||||
# newer version requires rust edition 2021
|
# newer version requires rust edition 2021
|
||||||
k8s-openapi = { version = "0.21", features = ["v1_24"] }
|
k8s-openapi = { version = "0.21", features = ["v1_24"] }
|
||||||
|
|
|
@ -2053,6 +2053,7 @@
|
||||||
"string",
|
"string",
|
||||||
"null"
|
"null"
|
||||||
],
|
],
|
||||||
|
"format": "date-time",
|
||||||
"description": "Expiration time and date, formatted according to RFC 3339"
|
"description": "Expiration time and date, formatted according to RFC 3339"
|
||||||
},
|
},
|
||||||
"expired": {
|
"expired": {
|
||||||
|
@ -3639,6 +3640,7 @@
|
||||||
"string",
|
"string",
|
||||||
"null"
|
"null"
|
||||||
],
|
],
|
||||||
|
"format": "date-time",
|
||||||
"description": "Expiration time and date, formatted according to RFC 3339"
|
"description": "Expiration time and date, formatted according to RFC 3339"
|
||||||
},
|
},
|
||||||
"name": {
|
"name": {
|
||||||
|
|
|
@ -317,7 +317,6 @@ pub struct GetAdminTokenInfoResponse {
|
||||||
/// Name of the admin API token
|
/// Name of the admin API token
|
||||||
pub name: String,
|
pub name: String,
|
||||||
/// Expiration time and date, formatted according to RFC 3339
|
/// Expiration time and date, formatted according to RFC 3339
|
||||||
#[schema(value_type = Option<String>)]
|
|
||||||
pub expiration: Option<chrono::DateTime<chrono::Utc>>,
|
pub expiration: Option<chrono::DateTime<chrono::Utc>>,
|
||||||
/// Whether this admin token is expired already
|
/// Whether this admin token is expired already
|
||||||
pub expired: bool,
|
pub expired: bool,
|
||||||
|
@ -357,7 +356,6 @@ pub struct UpdateAdminTokenRequestBody {
|
||||||
/// Name of the admin API token
|
/// Name of the admin API token
|
||||||
pub name: Option<String>,
|
pub name: Option<String>,
|
||||||
/// Expiration time and date, formatted according to RFC 3339
|
/// Expiration time and date, formatted according to RFC 3339
|
||||||
#[schema(value_type = Option<String>)]
|
|
||||||
pub expiration: Option<chrono::DateTime<chrono::Utc>>,
|
pub expiration: Option<chrono::DateTime<chrono::Utc>>,
|
||||||
/// Scope of the admin API token, a list of admin endpoint names (such as
|
/// Scope of the admin API token, a list of admin endpoint names (such as
|
||||||
/// `GetClusterStatus`, etc), or the special value `*` to allow all
|
/// `GetClusterStatus`, etc), or the special value `*` to allow all
|
||||||
|
|
Loading…
Add table
Reference in a new issue