Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax for Pulling in Subcomponents #10

Open
tgockel opened this issue Nov 11, 2018 · 0 comments
Open

Syntax for Pulling in Subcomponents #10

tgockel opened this issue Nov 11, 2018 · 0 comments
Labels
enhancement New feature or request

Comments

@tgockel
Copy link
Contributor

tgockel commented Nov 11, 2018

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
@francescobianco francescobianco added the enhancement New feature or request label Nov 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants