diff --git a/crates/policy/src/model.rs b/crates/policy/src/model.rs index 8ba780297..a3bf24b5f 100644 --- a/crates/policy/src/model.rs +++ b/crates/policy/src/model.rs @@ -82,6 +82,10 @@ pub struct Violation { pub redirect_uri: Option, pub field: Option, + // We flatten as policies expect `code` as another top-level field. + // + // This also means all of the extra fields from the variant will be splatted at this + // level which is fine (arbitrary). #[serde(flatten)] pub variant: Option, }