From 29e96d7948edfa8b460d11972cd375a49c71df63 Mon Sep 17 00:00:00 2001 From: Khuda Dad Nomani <32505158+KhudaDad414@users.noreply.github.com> Date: Mon, 13 Nov 2023 10:50:24 +0000 Subject: [PATCH 1/4] fix: add operations to the components section (#445) --- definitions/3.0.0/components.json | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/definitions/3.0.0/components.json b/definitions/3.0.0/components.json index 3f3589ef..537c49bd 100644 --- a/definitions/3.0.0/components.json +++ b/definitions/3.0.0/components.json @@ -68,6 +68,21 @@ } } }, + "operations": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json" + } + ] + } + } + }, "messages": { "type": "object", "patternProperties": { @@ -281,4 +296,4 @@ }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/components.json" -} \ No newline at end of file +} From 3df2a2e1de1b0d719e432e97fe2d5c87538deff3 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Mon, 13 Nov 2023 11:53:18 +0100 Subject: [PATCH 2/4] chore(release): v6.0.0-next-major-spec.12 (#447) --- package-lock.json | 4 ++-- package.json | 2 +- schemas/3.0.0-without-$id.json | 15 +++++++++++++++ schemas/3.0.0.json | 15 +++++++++++++++ 4 files changed, 33 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 55ddd172..8a6462b2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.11", + "version": "6.0.0-next-major-spec.12", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.11", + "version": "6.0.0-next-major-spec.12", "license": "Apache-2.0", "dependencies": { "@types/json-schema": "^7.0.11" diff --git a/package.json b/package.json index 2813fd6e..ff8d5c50 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.11", + "version": "6.0.0-next-major-spec.12", "description": "AsyncAPI schema versions", "main": "index.js", "types": "index.d.ts", diff --git a/schemas/3.0.0-without-$id.json b/schemas/3.0.0-without-$id.json index d604e3b5..7fd84a3d 100644 --- a/schemas/3.0.0-without-$id.json +++ b/schemas/3.0.0-without-$id.json @@ -5994,6 +5994,21 @@ } } }, + "operations": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/operation" + } + ] + } + } + }, "messages": { "type": "object", "patternProperties": { diff --git a/schemas/3.0.0.json b/schemas/3.0.0.json index eb8dc85a..a4009033 100644 --- a/schemas/3.0.0.json +++ b/schemas/3.0.0.json @@ -6084,6 +6084,21 @@ } } }, + "operations": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json" + } + ] + } + } + }, "messages": { "type": "object", "patternProperties": { From 728f63c2187c1436c9f739b69f1cba3009665607 Mon Sep 17 00:00:00 2001 From: Lukasz Gornicki Date: Mon, 13 Nov 2023 12:01:38 +0100 Subject: [PATCH 3/4] 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#", From 6caf1dca0b06d6dd9ec94c4555e04f8c7299483a Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Mon, 13 Nov 2023 12:04:24 +0100 Subject: [PATCH 4/4] chore(release): v6.0.0-next-major-spec.13 (#448) --- package-lock.json | 4 +-- package.json | 2 +- schemas/3.0.0-without-$id.json | 54 ++++++++++++++++++++++++++++++---- schemas/3.0.0.json | 54 ++++++++++++++++++++++++++++++---- 4 files changed, 99 insertions(+), 15 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8a6462b2..bc454b01 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.12", + "version": "6.0.0-next-major-spec.13", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.12", + "version": "6.0.0-next-major-spec.13", "license": "Apache-2.0", "dependencies": { "@types/json-schema": "^7.0.11" diff --git a/package.json b/package.json index ff8d5c50..8969c4ff 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.12", + "version": "6.0.0-next-major-spec.13", "description": "AsyncAPI schema versions", "main": "index.js", "types": "index.d.ts", diff --git a/schemas/3.0.0-without-$id.json b/schemas/3.0.0-without-$id.json index 7fd84a3d..3586d1ec 100644 --- a/schemas/3.0.0-without-$id.json +++ b/schemas/3.0.0-without-$id.json @@ -313,7 +313,14 @@ ] }, "bindings": { - "$ref": "#/definitions/serverBindingsObject" + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/serverBindingsObject" + } + ] } } }, @@ -1961,7 +1968,14 @@ ] }, "bindings": { - "$ref": "#/definitions/channelBindingsObject" + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/channelBindingsObject" + } + ] } } }, @@ -2088,7 +2102,14 @@ } }, "bindings": { - "$ref": "#/definitions/messageBindingsObject" + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/messageBindingsObject" + } + ] }, "traits": { "type": "array", @@ -3826,7 +3847,14 @@ } }, "bindings": { - "$ref": "#/definitions/messageBindingsObject" + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/messageBindingsObject" + } + ] } } }, @@ -4953,7 +4981,14 @@ ] }, "bindings": { - "$ref": "#/definitions/operationBindingsObject" + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/operationBindingsObject" + } + ] } } }, @@ -5038,7 +5073,14 @@ "$ref": "#/definitions/operation/properties/externalDocs" }, "bindings": { - "$ref": "#/definitions/operation/properties/bindings" + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/operationBindingsObject" + } + ] } } }, diff --git a/schemas/3.0.0.json b/schemas/3.0.0.json index a4009033..237fb05d 100644 --- a/schemas/3.0.0.json +++ b/schemas/3.0.0.json @@ -324,7 +324,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" + } + ] } } }, @@ -2006,7 +2013,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" + } + ] } } }, @@ -2135,7 +2149,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", @@ -3889,7 +3910,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" + } + ] } } }, @@ -5029,7 +5057,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" + } + ] } } }, @@ -5117,7 +5152,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" + } + ] } } },