bicep
bicep copied to clipboard
Better error message for unsupported YAML file syntax
Is your feature request related to a problem? Please describe.
The loadYamlContent()
expects single-document YAML content, and does not support document separators. If a multi-document YAML file is provided, the current error message surfaced is Unable to parse literal YAML value. Please ensure that it is well-formed.
Example multi-document YAML (this is technically valid YAML content):
abc: 'def'
---
ghi: 'jkl'
Bicep:
var mydata = loadYamlContent('test.yaml') // Unable to parse literal YAML value. Please ensure that it is well-formed (bicep[BCP340]).
Describe the solution you'd like If possible, it would be nice to surface a more specific error message, e.g. something along the lines of Bicep does not support multi-document YAML content.