Skip to content

Commit

Permalink
Fix presentation definition casing bug
Browse files Browse the repository at this point in the history
  • Loading branch information
KendallWeihe committed Sep 21, 2024
1 parent 1b42d19 commit 80f2161
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions crates/web5/src/credentials/presentation_definition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ pub struct PresentationDefinition {
#[serde(skip_serializing_if = "Option::is_none")]
pub purpose: Option<String>,

#[serde(rename = "inputDescriptors")]
#[serde(rename = "input_descriptors")]
pub input_descriptors: Vec<InputDescriptor>,
#[serde(rename = "submissionRequirements")]
#[serde(rename = "submission_requirements")]
pub submission_requirements: Option<Vec<SubmissionRequirement>>,
}

Expand Down Expand Up @@ -101,7 +101,7 @@ pub struct SubmissionRequirement {
pub rule: SubmissionRequirementRule,
#[serde(skip_serializing_if = "Option::is_none")]
pub from: Option<String>,
#[serde(skip_serializing_if = "Option::is_none", rename = "fromNested")]
#[serde(skip_serializing_if = "Option::is_none", rename = "from_nested")]
pub from_nested: Option<Vec<SubmissionRequirement>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
Expand All @@ -127,10 +127,10 @@ pub enum SubmissionRequirementRule {
pub struct PresentationSubmission {
pub id: String,

#[serde(rename = "definitionId")]
#[serde(rename = "definition_id")]
pub definition_id: String,

#[serde(rename = "descriptorMap")]
#[serde(rename = "descriptor_map")]
pub descriptor_map: Vec<InputDescriptorMapping>,
}

Expand All @@ -141,7 +141,7 @@ pub struct InputDescriptorMapping {
pub format: String,
pub path: String,

#[serde(rename = "pathNested")]
#[serde(rename = "path_nested")]
pub path_nested: Option<Box<InputDescriptorMapping>>,
}

Expand Down

0 comments on commit 80f2161

Please sign in to comment.