Skip to content

Commit

Permalink
update for cedar#1405 (#509)
Browse files Browse the repository at this point in the history
Signed-off-by: Craig Disselkoen <cdiss@amazon.com>
  • Loading branch information
cdisselkoen authored Jan 3, 2025
1 parent 7b0ef84 commit 8e39b69
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion cedar-policy-generators/src/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -572,8 +572,9 @@ impl Bindings {
Ok(json_schema::EntityType {
member_of_types: et.member_of_types.clone(),
shape: json_schema::AttributesOrContext(self.rewrite_record_type(u, ty)?),
tags: None,
tags: et.tags.clone(),
annotations: et.annotations.clone(),
loc: et.loc.clone(),
})
}

Expand Down Expand Up @@ -700,6 +701,7 @@ impl Schema {
}),
None => None,
},
loc: ty.loc.clone(),
},
))
})
Expand All @@ -714,6 +716,7 @@ impl Schema {
CommonType {
ty,
annotations: u.arbitrary()?,
loc: None,
},
))
})
Expand Down Expand Up @@ -931,6 +934,7 @@ impl Schema {
)?)
),
annotations: u.arbitrary()?,
loc: None,
},
))
})
Expand Down Expand Up @@ -1034,6 +1038,7 @@ impl Schema {
//TODO: Fuzz arbitrary attribute names and values.
attributes: None,
annotations: u.arbitrary()?,
loc: None,
},
))
})
Expand Down Expand Up @@ -1642,6 +1647,7 @@ fn downgrade_nsdef_to_raw(
CommonType {
ty: downgrade_schematype_to_raw(v.ty),
annotations: v.annotations,
loc: v.loc,
},
)
})
Expand Down Expand Up @@ -1738,6 +1744,7 @@ fn downgrade_entitytype_to_raw(
shape: downgrade_aoc_to_raw(entitytype.shape),
tags: entitytype.tags.map(downgrade_schematype_to_raw),
annotations: entitytype.annotations,
loc: entitytype.loc,
}
}

Expand All @@ -1762,6 +1769,7 @@ fn downgrade_action_to_raw(
.member_of
.map(|v| v.into_iter().map(downgrade_aeuid_to_raw).collect()),
annotations: action.annotations,
loc: action.loc,
}
}

Expand Down

0 comments on commit 8e39b69

Please sign in to comment.