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.yamlWhat gets checked
- Top-level shape — required keys (
name,input,filters,output) are present and the right type. - Module discriminator —
input.type,output.type, and eachfilters[].typeresolve to a supported module. - Module options — every option's type, enum, pattern, and required flag against the module's own schema.
- Cross-cutting blocks —
authentication,retry,pagination,statePersistence,cacheall 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
| Flag | Effect |
|---|---|
--verbose | Print the parsed pipeline structure (modules, defaults inheritance, env-var positions). |
--quiet | Suppress the success banner. Errors still go to stderr. |
--log-file <path> | Write logs to a file instead of stdout. |
Exit codes
| Code | Meaning |
|---|---|
0 | Pipeline is valid. |
1 | Schema validation errors. Details on stderr. |
2 | Parse 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/*.yamlExits 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"