Skip to content

Commit bb971ce

Browse files
authored
bugfix: nym-credential-proxy query params parsing regression (#6121)
1 parent 54de369 commit bb971ce

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nym-credential-proxy/nym-credential-proxy-requests/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ schemars = { workspace = true, features = ["preserve_order", "uuid1"] }
1616
uuid = { workspace = true, features = ["serde"] }
1717
serde = { workspace = true, features = ["derive"] }
1818
serde_json.workspace = true
19+
serde_with = { workspace = true }
1920
time = { workspace = true, features = ["serde", "formatting", "parsing"] }
2021
tsify = { workspace = true, optional = true }
2122
reqwest = { workspace = true, features = ["json", "rustls-tls"] }

nym-credential-proxy/nym-credential-proxy-requests/src/api/v1/ticketbook/models.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ use schemars::JsonSchema;
99
use schemars::r#gen::SchemaGenerator;
1010
use schemars::schema::Schema;
1111
use serde::{Deserialize, Serialize};
12+
use serde_with::{DisplayFromStr, serde_as};
1213
use std::ops::{Deref, DerefMut};
1314
use time::{Date, OffsetDateTime};
1415

@@ -264,28 +265,34 @@ pub struct WebhookTicketbookWalletSharesRequest {
264265
pub secret: String,
265266
}
266267

268+
#[serde_as]
267269
#[derive(Default, Debug, Serialize, Deserialize, Clone)]
268270
#[cfg_attr(feature = "openapi", derive(utoipa::ToSchema, utoipa::IntoParams))]
269271
#[cfg(feature = "query-types")]
270272
#[serde(default, rename_all = "kebab-case")]
271273
pub struct TicketbookObtainParams {
272274
#[serde(default)]
275+
#[serde_as(as = "DisplayFromStr")]
273276
pub skip_webhook: bool,
274277

275278
#[serde(default)]
276279
#[serde(flatten)]
277280
pub global: GlobalDataParams,
278281
}
279282

283+
#[serde_as]
280284
#[derive(Default, Debug, Serialize, Deserialize, Clone)]
281285
#[cfg_attr(feature = "openapi", derive(utoipa::ToSchema, utoipa::IntoParams))]
282286
#[cfg(feature = "query-types")]
283287
#[serde(default, rename_all = "kebab-case")]
284288
pub struct GlobalDataParams {
289+
#[serde_as(as = "DisplayFromStr")]
285290
pub include_master_verification_key: bool,
286291

292+
#[serde_as(as = "DisplayFromStr")]
287293
pub include_coin_index_signatures: bool,
288294

295+
#[serde_as(as = "DisplayFromStr")]
289296
pub include_expiration_date_signatures: bool,
290297
}
291298

0 commit comments

Comments
 (0)