vscode-backstage
vscode-backstage copied to clipboard
Feature request: Schema validation for catalog-info
Hi.
Any plans to introduce schema validation to catalog-info files? I think it would be a great addition :) Schema for backstage can be found here https://json.schemastore.org/catalog-info.json / https://github.com/backstage/backstage/blob/master/packages/catalog-model/src/schema/Entity.schema.json
The YAML extension by RedHat already does this automatically.
Maybe we should recommend it in the readme, or add it to extensionDependencies
in the manifest?
The YAML extension by RedHat already does this automatically.
Maybe we should recommend it in the readme, or add it to
extensionDependencies
in the manifest?
I added the schema to my YAML validation in vsCode. It just seems a bit redundant when this plugin exists already :)
I might be mistaken, but it appears that vscode does not inherently provide support for json-schemas with yaml files. To enable YAML validation, a language server needs to be implemented with json schema integration. As @h3rmanj mentioned, RedHat's YAML language support, which is considered the de-facto standard, already has this feature implemented.
With this in mind, I believe that incorporating validation functionality is beyond the scope of the Backstage plugin. I'd rather modify the package.json manifest to include redhat.vscode-yaml as an extensionDependency.
@ehrnst any tips on how to provide this functionality without re-inventing the wheel would be greatly appreciated.