backstage-entity-validator icon indicating copy to clipboard operation
backstage-entity-validator copied to clipboard

Handle nunjucks syntax for template files

Open sblausten opened this issue 2 years ago • 1 comments

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:

sblausten avatar Feb 03 '23 11:02 sblausten

https://app.shortcut.com/larder/story/13272

roadie-bot avatar Feb 03 '23 11:02 roadie-bot