-
Notifications
You must be signed in to change notification settings - Fork 72
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
Allow yaml-anchors in schema #2200
Conversation
@shreyas-goenka could you take a look? |
bundle/internal/schema/main.go
Outdated
// AdditionalProperties is set to an empty schema to allow non-typed keys used as yaml-anchors | ||
// Example: | ||
// some_anchor: &some_anchor | ||
// file_path: /some/path/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tab in comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replaced with spaces
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you make a corresponding passing test case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good suggestion, added!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
CLI: * Added text output templates for apps list and list-deployments ([#2175](#2175)). * Fix duplicate "apps" entry in help output ([#2191](#2191)). Bundles: * Allow yaml-anchors in schema ([#2200](#2200)). * Show an error when non-yaml files used in include section ([#2201](#2201)). * Set WorktreeRoot to sync root outside git repo ([#2197](#2197)). * fix: Detailed message for using source-linked deployment with file_path specified ([#2119](#2119)). * Allow using variables in enum fields ([#2199](#2199)). * Add experimental-jobs-as-code template ([#2177](#2177)). * Reading variables from file ([#2171](#2171)). * Fixed an apps message order and added output test ([#2174](#2174)). * Default to forward slash-separated paths for path translation ([#2145](#2145)). * Include a materialized copy of built-in templates ([#2146](#2146)).
CLI: * Added text output templates for apps list and list-deployments ([#2175](#2175)). * Fix duplicate "apps" entry in help output ([#2191](#2191)). Bundles: * Allow yaml-anchors in schema ([#2200](#2200)). * Show an error when non-yaml files used in include section ([#2201](#2201)). * Set WorktreeRoot to sync root outside git repo ([#2197](#2197)). * fix: Detailed message for using source-linked deployment with file_path specified ([#2119](#2119)). * Allow using variables in enum fields ([#2199](#2199)). * Add experimental-jobs-as-code template ([#2177](#2177)). * Reading variables from file ([#2171](#2171)). * Fixed an apps message order and added output test ([#2174](#2174)). * Default to forward slash-separated paths for path translation ([#2145](#2145)). * Include a materialized copy of built-in templates ([#2146](#2146)).
Changes
Allows custom untyped fields in the root config in json-schema so it doesn't highlight errors when using yaml-anchors.
Example use case:
One downside is that we don't highlight any unknown top-level properties anymore (but they will still fail during CLI validation)
Tests
Manually checked behavior in VSCode - it doesn't show validation error. Also checked that other typed properties are still suggested