-
-
Notifications
You must be signed in to change notification settings - Fork 776
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
not able to parse anchor variable reference #301
Comments
JS-YAML registers anchors only for non-empty nodes. I'll check if it conforms the spec or not. |
This may be related to #319. |
You can add an anchor to any node, the spec doesn't say anything special about empty nodes.
I currently get this JSON output:
where |
I added a test for this: https://github.com/yaml/yaml-test-suite/blob/master/test/6KGN.tml |
Fixed in e8cf6f6 (currently in |
Hi,
I m trying to parse a swagger.yaml with js-yaml. I have defined anchor variables and referenced them as below.
The parser throws exception at line *cache-session: xyz
error: unidentified alias "xyz" at line 28, column 22:
cache-session: *xyz
^
Below is my code
Is there any option that can be used while parsing, so that js-yaml will parse the references to anchor variables successfully?
The text was updated successfully, but these errors were encountered: