From d60dc6110043cbedd93297612bc65b5e673b6723 Mon Sep 17 00:00:00 2001 From: Brian Phillips <28457+brianphillips@users.noreply.github.com> Date: Tue, 16 Jan 2024 13:30:29 -0600 Subject: [PATCH] Use the CORE_SCHEMA when parsing entity YAML This is a follow-up to #1198 and applies the same fix to keep YAML parsing inline with how Backstage core parses the catalog YAML files. --- .changeset/thin-singers-brake.md | 5 +++++ .../src/relativeSpaceValidation.js | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/thin-singers-brake.md diff --git a/.changeset/thin-singers-brake.md b/.changeset/thin-singers-brake.md new file mode 100644 index 000000000..bcd5cb6be --- /dev/null +++ b/.changeset/thin-singers-brake.md @@ -0,0 +1,5 @@ +--- +'@roadiehq/roadie-backstage-entity-validator': patch +--- + +use CORE_SCHEMA when parsing catalog YAML files for validation diff --git a/utils/roadie-backstage-entity-validator/src/relativeSpaceValidation.js b/utils/roadie-backstage-entity-validator/src/relativeSpaceValidation.js index 5879c74a5..b9646fd63 100644 --- a/utils/roadie-backstage-entity-validator/src/relativeSpaceValidation.js +++ b/utils/roadie-backstage-entity-validator/src/relativeSpaceValidation.js @@ -53,7 +53,7 @@ export const relativeSpaceValidation = async ( verbose, ) => { try { - const data = yaml.loadAll(fileContents); + const data = yaml.loadAll(fileContents, { schema: yaml.CORE_SCHEMA }); if (verbose) { console.log('Validating locally dependant catalog contents'); }