greentic-flow-dev 1.1.27665160846

Generic YGTC flow schema/loader/IR for self-describing component nodes.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
//! Shared test helpers. Each integration test imports this via `mod common;`
//! and `use common::*;`.

use jsonschema::{Draft, Validator};
use serde_json::Value;

pub fn build_validator(schema: &Value) -> Validator {
    jsonschema::options()
        .with_draft(Draft::Draft202012)
        .build(schema)
        .expect("compile flow schema")
}