YAML Anchors and References Break Schema Validation and Suggestions
See original GitHub issueDescribe the bug
When user anchors or references in CloudFormation YAML files, schemas stops working when anchors/references are used.
Expected Behavior
It works as normal.
Current Behavior
Following error keeps repeating as elements are hovered.
Error thrown while requesting schema "Error: end of the stream or a document separator is expected" when calling the registered contributor "cloudformation"
Steps to Reproduce
- Add an anchor to any element
...
Tags: &tags
- Key: Application
Value: MyApp
...
Environment
- Windows
- Mac
- Linux
- other (please specify)
Issue Analytics
- State:
- Created 3 years ago
- Comments:6
Top Results From Across the Web
Advanced YAML syntax cheatsheet - Educative.io
Here's what we'll cover today: Validator and Parser; Anchors and Alias; Schemas; Escape Sequences; Separators and Directives; Wrapping up ...
Read more >Optimize GitLab CI/CD configuration files
You can reduce complexity and duplicated configuration in your GitLab CI/CD configuration files by using: YAML-specific features like anchors ( & ), aliases ......
Read more >YAML Ain't Markup Language (YAML™) revision 1.2.2
It is up to the YAML processor to come up with human-friendly key order and anchor names, possibly with the help of the...
Read more >YAML Anchor, Aliases and Merge Keys
Schema -validation of a YAML document is only possible when all references and merge keys are represented. However, it is not that every...
Read more >Structuring a complex schema — Understanding JSON ...
Like any other code, schemas are easier to maintain if they can be broken down into logical units that reference each other as...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It is bug
kddejong.vscode-cfn-lint
in as they usenode-yaml-parser
to parse yaml and it seems it not support yaml anchor’s. I will investigate more next week, we need to improve our behavior in case if contributing extension fails.Thanks. Already opened issue with then about the issue. https://github.com/aws-cloudformation/aws-cfn-lint-visual-studio-code/issues/158