Skip to content

Commit e5cc9f3

Browse files
committed
Revert back to dereference and ignore circular
1 parent e05c074 commit e5cc9f3

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

eventcatalog/src/components/SchemaExplorer/JSONSchemaViewer.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,13 @@ function mergeAllOfSchemas(schemaWithProcessor: any): any {
103103

104104
async function processSchema(schema: any, rootSchema?: any): Promise<any> {
105105
if (!schema) return schema;
106-
let returnSchema = await $RefParser.resolve(schema);
107-
return returnSchema;
106+
107+
let dereferencedSchema = await $RefParser.dereference(schema, {
108+
dereference: {
109+
circular: 'ignore', // Don't allow circular $refs
110+
},
111+
});
112+
return dereferencedSchema;
108113
}
109114

110115
// SchemaProperty component

0 commit comments

Comments
 (0)