Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

extending with yaml anchors #158

Open
reesew opened this issue Sep 3, 2015 · 2 comments
Open

extending with yaml anchors #158

reesew opened this issue Sep 3, 2015 · 2 comments

Comments

@reesew
Copy link

reesew commented Sep 3, 2015

I can't use yaml's ability to extend objects defined earlier, I get an error only scalar map keys are allowed in RAML. Here's an example:

extendable: &extendable
  inherited: prop
extended:
  <<: *extendtable
  extra: prop0
items:
  - <<: *extendable
    extra: prop1
  - <<: *extendable
    extra: prop2

which should expand to

...
extended:
  inherited: prop
  extra: prop0
items:
  - inherited: prop
    extra: prop1
  - inherited: prop
    extra: prop2

Is it really true that only scalar map keys are allowed for RAML? Or is it just that the parser doesn't know how to handle the <<: key? (I am not even sure whether << is a scalar or not)

@sichvoge
Copy link

Only scalar map keys are allowed afaik.

@reesew
Copy link
Author

reesew commented Jul 28, 2016

ok, but the <<: *foo functionality is valid yaml, so, is there a way to get that fixed?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants