Open gcardwel opened 7 years ago
After some review, it appears that the problem here is that the output path substitution does not support looking up objects in a hierarchy, as in {value.file}. Instead, only a single level of object retrieval is supported. Without changing the library used for output path, this can't be fixed.
I am trying to render multiple output files using the --output and --many-pairs options. The intent is to traverse a map of objects, each of which will generate an output file.
The .yml file looks approximately like this:
and the content of the .hbs file is empty for now.
Using a command line like this:
render --verbose --engine handlebars Enumerations.hbs --context encodings.yml --output '{value.file}' --many-pairs enumerations
I would expect that I would iterate through the enumerations object, getting keys of each "failureModeEncoding, dtcType, controlModeEncoding" and values that are objects containing the "file" key.
Unfortunately, I'm unable to find any substitution string that will go in the --output that works. I usually get some variation of:
Error: Found more than one context set for . Pick an output filename template that produces a unique filename for each set of context.
I'm unable to figure out what context I need to put in the --output parameter, as the unit test cases don't seem to cover this, I don't have a starting point of reference.