Open ndeloof opened 4 years ago
python seems have a library to parse yaml tree: https://pypi.org/project/yamlpath/. But still there is no standard way to define the syntax, we can choose one and implement it in golang
This is now feasible relying on tree.Path
syntax
We need to replace https://github.com/compose-spec/compose-go/issues/11 with a pluggable API for implementations to express keys they don't support.
v3 broke the v2 approach to define services options as a list of fields, that can be easily white|blacklisted as
[]string
. We need a way to filter an actual yaml tree.Proposal: introduce option for implementation to declare a whitelist (or blacklist) of yaml paths. Check
configDict map[string]interface{}
to only/not include elements matching such pathsIt doesn't seem there's a standard syntax to express paths in yaml tree, nothing comparable to xpath. Assuming we can use a comparable syntax, we could define a blacklist like this:
services/*/deploy/placement
services/*/volumesFrom