Skip to main content

parse_and_validate_plan

Function parse_and_validate_plan 

Source
pub fn parse_and_validate_plan(raw: &Value) -> Result<Plan, PlanValidationError>
Expand description

Parse a raw JSON value as a plan.json v3 document and validate it.

The two-phase entry point the supervisor/spec-node use. It gates the version before deserializing into the typed shape, so a future/unknown major yields a clean PlanValidationError::UnsupportedSchemaVersion instead of a confusing shape mismatch. On success the returned Plan has passed every structural rule in validate_plan.

ยงErrors

Returns the first PlanValidationError found.