Skip to content

Commit 43a0067

Browse files
committed
Skip encryption serialization if None
Signed-off-by: Kai A. Hiller <[email protected]>
1 parent b3682a9 commit 43a0067

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

crates/config/src/sections/secrets.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ pub enum Encryption {
6060
struct EncryptionRaw {
6161
/// File containing the encryption key for secure cookies.
6262
#[schemars(with = "Option<String>")]
63+
#[serde(skip_serializing_if = "Option::is_none")]
6364
encryption_file: Option<Utf8PathBuf>,
6465

6566
/// Encryption key for secure cookies.
@@ -69,6 +70,7 @@ struct EncryptionRaw {
6970
example = "example_secret"
7071
)]
7172
#[serde_as(as = "Option<serde_with::hex::Hex>")]
73+
#[serde(skip_serializing_if = "Option::is_none")]
7274
encryption: Option<[u8; 32]>,
7375
}
7476

docs/config.schema.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1530,7 +1530,6 @@
15301530
},
15311531
"encryption": {
15321532
"description": "Encryption key for secure cookies.",
1533-
"default": null,
15341533
"examples": [
15351534
"0000111122223333444455556666777788889999aaaabbbbccccddddeeeeffff"
15361535
],

0 commit comments

Comments
 (0)