From acfb26e9554ec5400d24023c97ef0af9bfdf74c9 Mon Sep 17 00:00:00 2001 From: Pavel Bodiachevskii Date: Mon, 25 Mar 2024 22:24:11 +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/anySchema.json | 17 +---------------- schemas/3.0.0-without-$id.json | 29 +---------------------------- schemas/3.0.0.json | 29 +---------------------------- 3 files changed, 3 insertions(+), 72 deletions(-) diff --git a/definitions/3.0.0/anySchema.json b/definitions/3.0.0/anySchema.json index cc60af06..db910599 100644 --- a/definitions/3.0.0/anySchema.json +++ b/definitions/3.0.0/anySchema.json @@ -17,26 +17,11 @@ "description": "Reference to schema" } }, - "minProperties": 1, "oneOf": [ { "description": "Because of $ref collision in Reference and AsyncAPI Schema(includes $ref from Json Schema)", "not": {"required": ["schemaFormat", "schema"]}, - "anyOf": [ - { - "type": "object", - "required": ["$ref"], - "not": {"required": ["schemaFormat", "schema"]}, - "minProperties": 1, - "maxProperties": 1, - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "type": "object", - "not": {"required": ["schemaFormat", "schema"]}, - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - } - ] + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" }, { "type": "object", diff --git a/schemas/3.0.0-without-$id.json b/schemas/3.0.0-without-$id.json index 574c75ed..cbd96cae 100644 --- a/schemas/3.0.0-without-$id.json +++ b/schemas/3.0.0-without-$id.json @@ -2702,7 +2702,6 @@ "description": "Reference to schema" } }, - "minProperties": 1, "oneOf": [ { "description": "Because of $ref collision in Reference and AsyncAPI Schema(includes $ref from Json Schema)", @@ -2712,33 +2711,7 @@ "schema" ] }, - "anyOf": [ - { - "type": "object", - "required": [ - "$ref" - ], - "not": { - "required": [ - "schemaFormat", - "schema" - ] - }, - "minProperties": 1, - "maxProperties": 1, - "$ref": "#/definitions/Reference" - }, - { - "type": "object", - "not": { - "required": [ - "schemaFormat", - "schema" - ] - }, - "$ref": "#/definitions/schema" - } - ] + "$ref": "#/definitions/schema" }, { "type": "object", diff --git a/schemas/3.0.0.json b/schemas/3.0.0.json index f6da964a..97ae09ab 100644 --- a/schemas/3.0.0.json +++ b/schemas/3.0.0.json @@ -2752,7 +2752,6 @@ "description": "Reference to schema" } }, - "minProperties": 1, "oneOf": [ { "description": "Because of $ref collision in Reference and AsyncAPI Schema(includes $ref from Json Schema)", @@ -2762,33 +2761,7 @@ "schema" ] }, - "anyOf": [ - { - "type": "object", - "required": [ - "$ref" - ], - "not": { - "required": [ - "schemaFormat", - "schema" - ] - }, - "minProperties": 1, - "maxProperties": 1, - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "type": "object", - "not": { - "required": [ - "schemaFormat", - "schema" - ] - }, - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - } - ] + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" }, { "type": "object",