WeaveDocs
Schema Check

Usage

Using the `schema-check` CLI: validate protocol and documentation contracts against the canonical schema repository.

Purpose

Schema validation utility for protocol and documentation contracts.

This page follows the real source shape for Schema Check and explains the workflow a developer is likely to use first.

Developer workflow

Start from the smallest constructor or builder, perform one meaningful operation, inspect the returned state, then add the relevant policy, storage, or network integration. The examples below should be expanded whenever the crate API changes.

Primary types to know

  • No public items were detected by the source scan. This page should be updated when the crate exposes new items.

Example shape

# Typical workflow: validate a manifest as part of CI.

set -euo pipefail

# Generate a manifest from a build.
build/manifest-tool render --out manifest.json

# Confirm the manifest matches the canonical schema before committing.
schema-check validate manifest.json --schema weave.weft.manifest.v1

# Bulk-validate every artifact directory the pipeline produced.
schema-check validate-dir ./artifacts --schema weave.weft.manifest.v1 --recursive

# Print the canonical content hash; a non-deterministic build will change it.
schema-check hash manifest.json

# In CI, fail fast when the manifest hash drifts from the recorded value.
expected=$(cat .expected-manifest-hash)
actual=$(schema-check hash manifest.json)
test "$expected" = "$actual"