From a858c6277c087ba40ea7b85d150085a614d205a7 Mon Sep 17 00:00:00 2001 From: Sergio Moya <1083296+smoya@users.noreply.github.com> Date: Tue, 8 Aug 2023 10:15:55 +0200 Subject: [PATCH] add comment --- src/ruleset/functions/documentStructure.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ruleset/functions/documentStructure.ts b/src/ruleset/functions/documentStructure.ts index af06effa9..2b8db6e96 100644 --- a/src/ruleset/functions/documentStructure.ts +++ b/src/ruleset/functions/documentStructure.ts @@ -50,6 +50,8 @@ function prepareResults(errors: ErrorObject[]): void { } } +// this is needed because some v3 object fields are expected to be only `$ref` to other objects. +// In order to validate resolved references, we modify those schemas and instead allow the definition of the object function prepareV3ResolvedSchema(copied: any): any { // channel object const channelObject = copied.definitions['http://asyncapi.com/definitions/3.0.0/channel.json'];