Merge pull request #17633 from gtestault/openapi_resolve_relative_online_refs

fix(catalog-backend-module-openapi): resolve relative online refs fixes #17634
This commit is contained in:
Patrik Oldsberg
2023-05-05 10:40:34 +02:00
committed by GitHub
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-backend-module-openapi': patch
---
Fixed bug in `jsonSchemaRefPlaceholderResolver` where relative $ref files were resolved through file system instead of base URL of file
@@ -65,6 +65,6 @@ export async function bundleFileWithRefs(
},
};
const fileObject = parse(fileWithRefs);
const bundledObject = await $RefParser.bundle(fileObject, options);
const bundledObject = await $RefParser.bundle(baseUrl, fileObject, options);
return stringify(bundledObject);
}