Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions bundle/internal/schema/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,15 @@ func generateSchema(workdir, outputFile string) {
a.addAnnotations,
addInterpolationPatterns,
})

// 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/

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tab in comment.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replaced with spaces

// workspace:
// <<: *some_anchor
s.AdditionalProperties = jsonschema.Schema{}

if err != nil {
log.Fatal(err)
}
Expand Down

Copy link
Copy Markdown
Contributor

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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good suggestion, added!

This file was deleted.

2 changes: 1 addition & 1 deletion bundle/schema/jsonschema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.