Skip to content

Resolve Refs

This command takes a JSON or YAML document and resolves and replaces all external JSONRefs.

Usage

The resolve-refs command takes two parameters -input and -output

  • --input is the document to transform (either as JSON or YAML)

  • --output is the document to be created (either as JSON or YAML)

  • --output full path is created if it does not exist (like mkdir -p)

  • --allow-cycles external cyclic JSONRefs are replaced with empty placeholders {}

You may omit the --input or --output flags to read or write from stdin or stdout

Note

Only JSONRefs pointing to external documents are replaced. If a JSONRef points back within the same document, it is left unchanged.