From 297e77827da493851ac551ea153e0e067447f324 Mon Sep 17 00:00:00 2001 From: Pavel Bodiachevskii Date: Wed, 20 Mar 2024 01:54:15 +0400 Subject: [PATCH] fix: AsyncAPI v3 shows warning in Studio and IntelliJ plugin when referencing a json schema New multiFormatSchema validation rules https://github.com/asyncapi/spec-json-schemas/issues/494 https://github.com/asyncapi/jasyncapi-idea-plugin/issues/49 --- definitions/3.0.0/multiFormatSchema.json | 2 ++ schemas/3.0.0-without-$id.json | 10 ++++++++++ schemas/3.0.0.json | 10 ++++++++++ 3 files changed, 22 insertions(+) diff --git a/definitions/3.0.0/multiFormatSchema.json b/definitions/3.0.0/multiFormatSchema.json index ee96b828..0a5a8051 100644 --- a/definitions/3.0.0/multiFormatSchema.json +++ b/definitions/3.0.0/multiFormatSchema.json @@ -131,6 +131,7 @@ ] }, "schema": { + "not": {"required": ["$ref"]}, "$ref": "http://asyncapi.com/definitions/3.0.0/openapiSchema_3_0.json" } } @@ -164,6 +165,7 @@ ] }, "schema": { + "not": {"required": ["$ref"]}, "$ref": "http://asyncapi.com/definitions/3.0.0/avroSchema_v1.json" } } diff --git a/schemas/3.0.0-without-$id.json b/schemas/3.0.0-without-$id.json index b2220e0e..5769341d 100644 --- a/schemas/3.0.0-without-$id.json +++ b/schemas/3.0.0-without-$id.json @@ -2839,6 +2839,11 @@ ] }, "schema": { + "not": { + "required": [ + "$ref" + ] + }, "$ref": "#/definitions/openapiSchema_3_0" } } @@ -2879,6 +2884,11 @@ ] }, "schema": { + "not": { + "required": [ + "$ref" + ] + }, "$ref": "#/definitions/avroSchema_v1" } } diff --git a/schemas/3.0.0.json b/schemas/3.0.0.json index 5b83c4e3..915cc614 100644 --- a/schemas/3.0.0.json +++ b/schemas/3.0.0.json @@ -2890,6 +2890,11 @@ ] }, "schema": { + "not": { + "required": [ + "$ref" + ] + }, "$ref": "http://asyncapi.com/definitions/3.0.0/openapiSchema_3_0.json" } } @@ -2930,6 +2935,11 @@ ] }, "schema": { + "not": { + "required": [ + "$ref" + ] + }, "$ref": "http://asyncapi.com/definitions/3.0.0/avroSchema_v1.json" } }