diff --git a/src/models/utils.ts b/src/models/utils.ts index ced726791..47a0a73a7 100644 --- a/src/models/utils.ts +++ b/src/models/utils.ts @@ -3,10 +3,10 @@ import type { DetailedAsyncAPI } from '../types'; import { SchemaInterface } from './schema'; import { SchemaTypesToIterate, traverseAsyncApiDocument } from '../iterator'; import { AsyncAPIDocumentInterface } from './asyncapi'; -import { SchemasInterface } from 'models'; +import { SchemasInterface } from '../models'; export interface Constructor extends Function { - new (...any: any[]): T; + new(...any: any[]): T; } export type InferModelData = T extends BaseModel ? J : never; @@ -23,7 +23,7 @@ export function schemasFromDocument(document: AsyncA function callback(schema: SchemaInterface) { // comparing the reference (and not just the value) to the .json() object - if (!jsonInstances.has(schema.json())) { + if (!jsonInstances.has(schema.json())) { jsonInstances.add(schema.json()); schemas.add(schema); // unique schemas }