raml-js-parser
raml-js-parser copied to clipboard
extending with yaml anchors
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)
Only scalar map keys are allowed afaik.
ok, but the <<: *foo
functionality is valid yaml, so, is there a way to get that fixed?