pub struct Diagnostic {Show 18 fields
pub rule_id: String,
pub severity: Severity,
pub message: String,
pub source: RuleOrigin,
pub entity: Option<Entity>,
pub property_path: Option<String>,
pub suggested_fix: Option<String>,
pub category: Option<String>,
pub start_line: Option<u32>,
pub start_column: Option<u32>,
pub end_line: Option<u32>,
pub end_column: Option<u32>,
pub related_resources: Option<Vec<RelatedResource>>,
pub condition_scenario: Option<HashMap<String, bool>>,
pub documentation_url: Option<String>,
pub rule_description: Option<String>,
pub phase: Option<Phase>,
pub context: Option<ViolationContext>,
}Expand description
A single validation finding in the public report shape: the targeted entity is
carried as a nested entity struct and the source location is flattened into
individual line/column fields. The enrichment fields - documentation_url,
rule_description, phase, and context - are carried only when a report is
projected at the DETAILED detail level; the STANDARD detail level leaves them
None, so they are omitted from serialization.
Fields§
§rule_id: StringIdentifier of the rule that produced this finding; its leading letter encodes the severity.
severity: Severity§message: String§source: RuleOriginWhere the rule came from, such as a provider schema, the built-in engine, or a user-supplied rule.
entity: Option<Entity>The named template entity this finding targets - a resource, parameter, output, mapping, condition, or template rule - if any.
property_path: Option<String>Path to the offending property within the resource, such as ‘Properties.Name’.
suggested_fix: Option<String>§category: Option<String>§start_line: Option<u32>Line in the source template where the finding begins (1-based).
start_column: Option<u32>§end_line: Option<u32>§end_column: Option<u32>§condition_scenario: Option<HashMap<String, bool>>Condition name to boolean assignment under which this finding applies, when it depends on template conditions.
documentation_url: Option<String>§rule_description: Option<String>§phase: Option<Phase>§context: Option<ViolationContext>