Address second round of PR review comments
- Close async iterators in ModelHolder after reading first value to prevent resource leaks - Catch exceptions from validateMetaSchema in Zod refine predicate so validation errors flow through Zod's normal issue reporting - Warn on duplicate catalog model layer IDs instead of silently dropping later entries - Replace `as any` with `as JsonObject` for schema import in scaffolder template model layer Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Fredrik Adelöw <freben@spotify.com>
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
|
||||
import { createCatalogModelLayer } from '@backstage/catalog-model/alpha';
|
||||
import { JsonObject } from '@backstage/types';
|
||||
import schema from './Template.v1beta3.schema.json';
|
||||
|
||||
/**
|
||||
@@ -47,7 +48,7 @@ export const templateModelLayer = createCatalogModelLayer({
|
||||
},
|
||||
],
|
||||
schema: {
|
||||
jsonSchema: schema as any,
|
||||
jsonSchema: schema as JsonObject,
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user