cannectors

validate

Parse a pipeline file and check it against the JSON Schema.

cannectors validate <pipeline.yaml>

Reads the file, parses it as YAML, validates every block against the JSON Schema the runtime uses, and reports the result. Doesn't run the pipeline.

Examples

cannectors validate ./examples/01-http-polling-basic-to-http-batch.yaml
cannectors validate --verbose ./examples/10-mapping-transforms-all.yaml
cannectors validate --quiet  ./examples/22-defaults-inheritance.yaml

What gets checked

  • Top-level shape — required keys (name, input, filters, output) are present and the right type.
  • Module discriminatorinput.type, output.type, and each filters[].type resolve to a supported module.
  • Module options — every option's type, enum, pattern, and required flag against the module's own schema.
  • Cross-cutting blocksauthentication, retry, pagination, statePersistence, cache all validated against their shared schemas.

validate does not resolve environment variables, hit external services, or open database connections. It's a pure parse-and-check pass — safe to run in CI on every commit.

Flags

FlagEffect
--verbosePrint the parsed pipeline structure (modules, defaults inheritance, env-var positions).
--quietSuppress the success banner. Errors still go to stderr.
--log-file <path>Write logs to a file instead of stdout.

Exit codes

CodeMeaning
0Pipeline is valid.
1Schema validation errors. Details on stderr.
2Parse error — the file isn't valid YAML/JSON.

See Exit codes for the full table.

In CI

A typical pre-merge gate:

cannectors validate ./pipelines/*.yaml

Exits non-zero on the first invalid file, so the CI step fails fast. For all-or-nothing behavior, loop manually and collect:

fail=0
for f in pipelines/*.yaml; do
  cannectors validate --quiet "$f" || fail=1
done
exit "$fail"

See also