helm-schema-core 0.0.3

Generate an accurate JSON schema for any helm chart
Documentation
use crate::{MergeLayersUse, ResourceRef, SplitSegmentUse, ValueKind, YamlPath};

/// Contract fact that needs a Kubernetes resource schema lookup.
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct ProviderSchemaUse {
    /// Canonical values path whose runtime value reaches the provider slot.
    pub value_path: String,
    /// Structural path of the slot in the rendered Kubernetes resource.
    pub path: YamlPath,
    /// How the value contributes to rendered YAML at the slot.
    pub kind: ValueKind,
    /// Resource whose schema owns the slot.
    pub resource: ResourceRef,
    /// Whether the value is the collection directly ranged by the template.
    pub is_self_range_collection: bool,
    /// Literal member keys the template writes beside the splice in the
    /// same mapping; the slot schema's `required` must not re-demand them.
    pub template_supplied_member_keys: std::collections::BTreeSet<String>,
    /// Set when the rendered text is one separator-delimited segment of the
    /// source string; the slot schema constrains that segment only.
    pub split_segment: Option<SplitSegmentUse>,
    /// Set when the value renders as one layer of an ordered `merge`: a
    /// shadowed layer's members reach the slot only where every earlier
    /// layer lacks them.
    pub merge_layers: Option<MergeLayersUse>,
    /// Set when the rendered text is the collection's RANGE KEY rather than
    /// its value: a string-only slot then excludes the integer keys of a
    /// non-empty list lane.
    pub range_key: bool,
    /// Set when the rendered text is a Sprig `quote`/`squote` of the value:
    /// the transform SKIPS nil operands, so a missing or null source
    /// renders an explicit YAML null into the slot. Typing still abstains
    /// (any input quotes); only provider-required presence claims may read
    /// this flag.
    pub nil_omitting: bool,
    /// Literal member keys a guard-scoped `omit` may remove from the
    /// rendered map before the sink reads it: the slot's whole-payload
    /// typing must exclude them, and each key's member typing is re-added
    /// only under its RETAIN guards (empty means never).
    pub omitted_members: std::collections::BTreeMap<String, Vec<crate::ConditionalGuard>>,
    /// Decoded conditions gating the render this use rides. Synthesized
    /// merge-layer arms must carry them: without the gates a dormant state
    /// (KPS's `defaultRules.create: false`) would still be typed by the
    /// layer arms even though nothing renders.
    pub outer_guards: Vec<crate::ConditionalGuard>,
}