diff --git a/Cargo.toml b/Cargo.toml index b7830a7d..ab35f757 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -101,7 +101,7 @@ serde = { version = "1.0", default-features = false, features = ["derive", "rc"] serde_bytes = "0.11" serde_json = "1.0" 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 k8s-openapi = { version = "0.21", features = ["v1_24"] } diff --git a/doc/api/garage-admin-v2.json b/doc/api/garage-admin-v2.json index 6ede967b..8f3517cb 100644 --- a/doc/api/garage-admin-v2.json +++ b/doc/api/garage-admin-v2.json @@ -2053,6 +2053,7 @@ "string", "null" ], + "format": "date-time", "description": "Expiration time and date, formatted according to RFC 3339" }, "expired": { @@ -3639,6 +3640,7 @@ "string", "null" ], + "format": "date-time", "description": "Expiration time and date, formatted according to RFC 3339" }, "name": { diff --git a/src/api/admin/api.rs b/src/api/admin/api.rs index 94cb7377..11ffb772 100644 --- a/src/api/admin/api.rs +++ b/src/api/admin/api.rs @@ -317,7 +317,6 @@ pub struct GetAdminTokenInfoResponse { /// Name of the admin API token pub name: String, /// Expiration time and date, formatted according to RFC 3339 - #[schema(value_type = Option)] pub expiration: Option>, /// Whether this admin token is expired already pub expired: bool, @@ -357,7 +356,6 @@ pub struct UpdateAdminTokenRequestBody { /// Name of the admin API token pub name: Option, /// Expiration time and date, formatted according to RFC 3339 - #[schema(value_type = Option)] pub expiration: Option>, /// Scope of the admin API token, a list of admin endpoint names (such as /// `GetClusterStatus`, etc), or the special value `*` to allow all