Support for parsing lists in yaml-parse Promotion Step. #5091
Closed
bartpaczkows
started this conversation in
Ideas
Replies: 1 comment
-
|
Isn't this the same thing as #5102? Let's keep the conversation in just one place, please. Closing in favor of #5102. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
The current implementation of the yaml-parse promotion step does not allow parsing YAML files that contain a list; only maps are supported. My proposed solution is to modify the readAndParseYAML function so that it always returns a map. If the parsed YAML file contains a list at the root, the function should wrap this list in a root element before returning the data structure.
For example, if our input YAML file looks like this:
The returned data should contain a "root" element, like so:
By doing so, we will be able to use fromExpression statements such as the following:
filter(root, .destination?.name == "demo1")which is currently not possible.
Please let me know if it makes sense to prepare such a Merge Request.
Beta Was this translation helpful? Give feedback.
All reactions