From 728f63c2187c1436c9f739b69f1cba3009665607 Mon Sep 17 00:00:00 2001 From: Lukasz Gornicki Date: Mon, 13 Nov 2023 12:01:38 +0100 Subject: [PATCH] fix: enable `$ref` support for bindings (#442) --- definitions/3.0.0/channel.json | 9 ++++++++- definitions/3.0.0/messageObject.json | 9 ++++++++- definitions/3.0.0/messageTrait.json | 9 ++++++++- definitions/3.0.0/operation.json | 9 ++++++++- definitions/3.0.0/operationTrait.json | 9 ++++++++- definitions/3.0.0/server.json | 9 ++++++++- 6 files changed, 48 insertions(+), 6 deletions(-) diff --git a/definitions/3.0.0/channel.json b/definitions/3.0.0/channel.json index 22a3c4b6..b42c9ae7 100644 --- a/definitions/3.0.0/channel.json +++ b/definitions/3.0.0/channel.json @@ -62,7 +62,14 @@ ] }, "bindings": { - "$ref": "http://asyncapi.com/definitions/3.0.0/channelBindingsObject.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/channelBindingsObject.json" + } + ] } }, "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/definitions/3.0.0/messageObject.json b/definitions/3.0.0/messageObject.json index 87c066f3..f3de84ef 100644 --- a/definitions/3.0.0/messageObject.json +++ b/definitions/3.0.0/messageObject.json @@ -107,7 +107,14 @@ } }, "bindings": { - "$ref": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json" + } + ] }, "traits": { "type": "array", diff --git a/definitions/3.0.0/messageTrait.json b/definitions/3.0.0/messageTrait.json index 86717cf0..e3aeae2f 100644 --- a/definitions/3.0.0/messageTrait.json +++ b/definitions/3.0.0/messageTrait.json @@ -74,7 +74,14 @@ } }, "bindings": { - "$ref": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json" + } + ] } }, "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/definitions/3.0.0/operation.json b/definitions/3.0.0/operation.json index 3bcf7fea..2ef195a3 100644 --- a/definitions/3.0.0/operation.json +++ b/definitions/3.0.0/operation.json @@ -88,7 +88,14 @@ ] }, "bindings": { - "$ref": "http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json" + } + ] } }, "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/definitions/3.0.0/operationTrait.json b/definitions/3.0.0/operationTrait.json index 986f4796..2a31835f 100644 --- a/definitions/3.0.0/operationTrait.json +++ b/definitions/3.0.0/operationTrait.json @@ -26,7 +26,14 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/externalDocs" }, "bindings": { - "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/bindings" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json" + } + ] } }, "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/definitions/3.0.0/server.json b/definitions/3.0.0/server.json index 17540811..c875979b 100644 --- a/definitions/3.0.0/server.json +++ b/definitions/3.0.0/server.json @@ -70,7 +70,14 @@ ] }, "bindings": { - "$ref": "http://asyncapi.com/definitions/3.0.0/serverBindingsObject.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/serverBindingsObject.json" + } + ] } }, "$schema": "http://json-schema.org/draft-07/schema#",