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/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 +} 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#", diff --git a/package-lock.json b/package-lock.json index 55ddd172..bc454b01 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.13", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.11", + "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 2813fd6e..8969c4ff 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.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 d604e3b5..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" + } + ] } } }, @@ -5994,6 +6036,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..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" + } + ] } } }, @@ -6084,6 +6126,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": {