diff --git a/crates/claims/crates/data-integrity/core/src/options.rs b/crates/claims/crates/data-integrity/core/src/options.rs index 2e4eec9c2..0ed4e670e 100644 --- a/crates/claims/crates/data-integrity/core/src/options.rs +++ b/crates/claims/crates/data-integrity/core/src/options.rs @@ -40,7 +40,7 @@ pub struct ProofOptions { /// Example domain values include: `domain.example`` (DNS domain), /// `https://domain.example:8443` (Web origin), `mycorp-intranet` (bespoke /// text string), and `b31d37d4-dd59-47d3-9dd8-c973da43b63a` (UUID). - #[serde(default, skip_serializing_if = "Vec::is_empty")] + #[serde(default, skip_serializing_if = "Vec::is_empty", rename = "domain")] pub domains: Vec, /// Used to mitigate replay attacks. diff --git a/crates/claims/crates/data-integrity/core/src/proof/configuration/mod.rs b/crates/claims/crates/data-integrity/core/src/proof/configuration/mod.rs index 8537c6e35..0e6fe7146 100644 --- a/crates/claims/crates/data-integrity/core/src/proof/configuration/mod.rs +++ b/crates/claims/crates/data-integrity/core/src/proof/configuration/mod.rs @@ -57,7 +57,7 @@ pub struct ProofConfiguration { /// Example domain values include: `domain.example`` (DNS domain), /// `https://domain.example:8443` (Web origin), `mycorp-intranet` (bespoke /// text string), and `b31d37d4-dd59-47d3-9dd8-c973da43b63a` (UUID). - #[serde(skip_serializing_if = "Vec::is_empty")] + #[serde(skip_serializing_if = "Vec::is_empty", rename = "domain")] pub domains: Vec, /// Used to mitigate replay attacks. diff --git a/crates/claims/crates/data-integrity/core/src/proof/de/field.rs b/crates/claims/crates/data-integrity/core/src/proof/de/field.rs index 55e9e5ef8..fff316b5e 100644 --- a/crates/claims/crates/data-integrity/core/src/proof/de/field.rs +++ b/crates/claims/crates/data-integrity/core/src/proof/de/field.rs @@ -295,7 +295,7 @@ impl<'de> serde::de::Visitor<'de> for FieldVisitor { "verificationMethod" => Ok(Field::VerificationMethod), "proofPurpose" => Ok(Field::ProofPurpose), "expires" => Ok(Field::Expires), - "domains" => Ok(Field::Domains), + "domain" => Ok(Field::Domains), "challenge" => Ok(Field::Challenge), "nonce" => Ok(Field::Nonce), _ => { @@ -316,7 +316,7 @@ impl<'de> serde::de::Visitor<'de> for FieldVisitor { b"verificationMethod" => Ok(Field::VerificationMethod), b"proofPurpose" => Ok(Field::ProofPurpose), b"expires" => Ok(Field::Expires), - b"domains" => Ok(Field::Domains), + b"domain" => Ok(Field::Domains), b"challenge" => Ok(Field::Challenge), b"nonce" => Ok(Field::Nonce), _ => { @@ -338,7 +338,7 @@ impl<'de> serde::de::Visitor<'de> for FieldVisitor { "verificationMethod" => Ok(Field::VerificationMethod), "proofPurpose" => Ok(Field::ProofPurpose), "expires" => Ok(Field::Expires), - "domains" => Ok(Field::Domains), + "domain" => Ok(Field::Domains), "challenge" => Ok(Field::Challenge), "nonce" => Ok(Field::Nonce), _ => { @@ -360,7 +360,7 @@ impl<'de> serde::de::Visitor<'de> for FieldVisitor { b"verificationMethod" => Ok(Field::VerificationMethod), b"proofPurpose" => Ok(Field::ProofPurpose), b"expires" => Ok(Field::Expires), - b"domains" => Ok(Field::Domains), + b"domain" => Ok(Field::Domains), b"challenge" => Ok(Field::Challenge), b"nonce" => Ok(Field::Nonce), _ => { diff --git a/crates/claims/crates/data-integrity/core/src/proof/mod.rs b/crates/claims/crates/data-integrity/core/src/proof/mod.rs index b57d354dd..16c138d9c 100644 --- a/crates/claims/crates/data-integrity/core/src/proof/mod.rs +++ b/crates/claims/crates/data-integrity/core/src/proof/mod.rs @@ -81,7 +81,7 @@ pub struct Proof { /// Example domain values include: `domain.example`` (DNS domain), /// `https://domain.example:8443` (Web origin), `mycorp-intranet` (bespoke /// text string), and `b31d37d4-dd59-47d3-9dd8-c973da43b63a` (UUID). - #[serde(skip_serializing_if = "Vec::is_empty")] + #[serde(skip_serializing_if = "Vec::is_empty", rename = "domain")] pub domains: Vec, /// Used to mitigate replay attacks.