yamlinc
yamlinc copied to clipboard
Syntax for Pulling in Subcomponents
Currently, $include
pulls in entire files. Many YAML tools support the JSON Reference syntax for pulling in pieces of other files as part of the URI fragment. This would extend the syntax to be: ${file}[#${reference}]
where reference
is a JSON reference.
As an example, if my file a.yml
looks like:
foo:
potato: 6
bar:
taco: 10
And my referring file looks like:
blub:
$include: './a.yml#/bar'
The output would look like:
blub:
taco: 10