Skip to main content

Module validator

Module validator 

Source
Expand description

Validator module: Validate specs against JSON Schema and perform semantic checks

Two-stage validation:

  1. JSON Schema validation (using embedded unit.spec.json)
  2. Semantic validation (Rust keywords, deps, etc.)

Structs§

ValidationOptions

Functions§

check_spec_versions
Emit a warning for each spec that lacks a spec_version field.
detect_cycles
Detect cycles in the dependency graph using depth-first search.
validate_deps_exist
Validate that all internal deps referenced by loaded specs exist in the same spec set.
validate_deps_exist_with_options
validate_full
Full validation (schema + semantic)
validate_full_with_options
Full validation (schema + semantic) with explicit options.
validate_no_duplicate_ids
Check for duplicate IDs across all loaded specs.
validate_raw_yaml
Validate a raw YAML-authored value against the JSON Schema before deserialization.
validate_rust_keywords
Check if any segment of an ID is a Rust reserved keyword
validate_schema
Validate a single spec against the JSON Schema
validate_semantic
Perform semantic validation (Rust keywords, deps, etc.)
validate_semantic_with_options
Perform semantic validation with explicit options.