backstage-entity-validator
backstage-entity-validator copied to clipboard
Handle nunjucks syntax for template files
Describe Request:
Running this against the cli generated example template that contains a contents folder with templated catalog-info
file where the name parameter uses nunjucks to dynamically create the name, fails as the validator expects a string matching a limited regex for the name parameter.
Examples:
Adding https://github.com/backstage/software-templates/tree/main/scaffolder-templates/pull-request fails validation due to:
Error: "metadata.name" is not valid; expected a string that is sequences of [a-zA-Z0-9] separated by any of [-_.], at most 63 characters in total but found "${{ values.name | dump }}". To learn more about catalog file format, visit: https://github.com/backstage/backstage/blob/master/docs/architecture-decisions/adr002-default-catalog-file-format.md
Supporting Documentation Links:
https://app.shortcut.com/larder/story/13272