From 27813d16fd1434d4d4d71426c81df611f9f457cc Mon Sep 17 00:00:00 2001 From: Matatjahu Date: Mon, 6 Feb 2023 13:56:05 +0100 Subject: [PATCH 1/2] fix: allow references in parameters --- definitions/2.0.0-rc1/parameters.json | 9 ++++++++- definitions/2.0.0-rc2/parameters.json | 9 ++++++++- definitions/2.0.0/channelItem.json | 5 +---- definitions/2.0.0/parameters.json | 9 ++++++++- definitions/2.1.0/channelItem.json | 5 +---- definitions/2.1.0/parameters.json | 9 ++++++++- definitions/2.2.0/channelItem.json | 5 +---- definitions/2.2.0/parameters.json | 9 ++++++++- definitions/2.3.0/channelItem.json | 5 +---- definitions/2.3.0/parameters.json | 9 ++++++++- definitions/2.4.0/channelItem.json | 5 +---- definitions/2.4.0/parameters.json | 9 ++++++++- definitions/2.5.0/channelItem.json | 5 +---- definitions/2.6.0/channelItem.json | 5 +---- 14 files changed, 63 insertions(+), 35 deletions(-) diff --git a/definitions/2.0.0-rc1/parameters.json b/definitions/2.0.0-rc1/parameters.json index e97435ce..f2c76621 100644 --- a/definitions/2.0.0-rc1/parameters.json +++ b/definitions/2.0.0-rc1/parameters.json @@ -1,7 +1,14 @@ { "type": "object", "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/parameter.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/parameter.json" + } + ] }, "description": "JSON objects describing re-usable channel parameters.", "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/definitions/2.0.0-rc2/parameters.json b/definitions/2.0.0-rc2/parameters.json index d3e916c5..17076e15 100644 --- a/definitions/2.0.0-rc2/parameters.json +++ b/definitions/2.0.0-rc2/parameters.json @@ -1,7 +1,14 @@ { "type": "object", "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/parameter.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/parameter.json" + } + ] }, "description": "JSON objects describing re-usable channel parameters.", "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/definitions/2.0.0/channelItem.json b/definitions/2.0.0/channelItem.json index 35ab3fb1..605223a8 100644 --- a/definitions/2.0.0/channelItem.json +++ b/definitions/2.0.0/channelItem.json @@ -11,10 +11,7 @@ "$ref": "http://asyncapi.com/definitions/2.0.0/ReferenceObject.json" }, "parameters": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.0.0/parameter.json" - } + "$ref": "http://asyncapi.com/definitions/2.0.0/parameters.json" }, "description": { "type": "string", diff --git a/definitions/2.0.0/parameters.json b/definitions/2.0.0/parameters.json index db548f03..2bb2b264 100644 --- a/definitions/2.0.0/parameters.json +++ b/definitions/2.0.0/parameters.json @@ -1,7 +1,14 @@ { "type": "object", "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.0.0/parameter.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.0.0/parameter.json" + } + ] }, "description": "JSON objects describing re-usable channel parameters.", "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/definitions/2.1.0/channelItem.json b/definitions/2.1.0/channelItem.json index 241142c6..c10589df 100644 --- a/definitions/2.1.0/channelItem.json +++ b/definitions/2.1.0/channelItem.json @@ -11,10 +11,7 @@ "$ref": "http://asyncapi.com/definitions/2.1.0/ReferenceObject.json" }, "parameters": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.1.0/parameter.json" - } + "$ref": "http://asyncapi.com/definitions/2.1.0/parameters.json" }, "description": { "type": "string", diff --git a/definitions/2.1.0/parameters.json b/definitions/2.1.0/parameters.json index 37bd933d..f70fa547 100644 --- a/definitions/2.1.0/parameters.json +++ b/definitions/2.1.0/parameters.json @@ -1,7 +1,14 @@ { "type": "object", "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.1.0/parameter.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.1.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.1.0/parameter.json" + } + ] }, "description": "JSON objects describing re-usable channel parameters.", "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/definitions/2.2.0/channelItem.json b/definitions/2.2.0/channelItem.json index 1a42bf78..30bb6b06 100644 --- a/definitions/2.2.0/channelItem.json +++ b/definitions/2.2.0/channelItem.json @@ -11,10 +11,7 @@ "$ref": "http://asyncapi.com/definitions/2.2.0/ReferenceObject.json" }, "parameters": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.2.0/parameter.json" - } + "$ref": "http://asyncapi.com/definitions/2.2.0/parameters.json" }, "description": { "type": "string", diff --git a/definitions/2.2.0/parameters.json b/definitions/2.2.0/parameters.json index 8dd19448..d024f223 100644 --- a/definitions/2.2.0/parameters.json +++ b/definitions/2.2.0/parameters.json @@ -1,7 +1,14 @@ { "type": "object", "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.2.0/parameter.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.2.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.2.0/parameter.json" + } + ] }, "description": "JSON objects describing re-usable channel parameters.", "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/definitions/2.3.0/channelItem.json b/definitions/2.3.0/channelItem.json index 0c9e6ef5..cbd107cf 100644 --- a/definitions/2.3.0/channelItem.json +++ b/definitions/2.3.0/channelItem.json @@ -11,10 +11,7 @@ "$ref": "http://asyncapi.com/definitions/2.3.0/ReferenceObject.json" }, "parameters": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.3.0/parameter.json" - } + "$ref": "http://asyncapi.com/definitions/2.3.0/parameters.json" }, "description": { "type": "string", diff --git a/definitions/2.3.0/parameters.json b/definitions/2.3.0/parameters.json index 91e6310a..387fec92 100644 --- a/definitions/2.3.0/parameters.json +++ b/definitions/2.3.0/parameters.json @@ -1,7 +1,14 @@ { "type": "object", "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.3.0/parameter.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.3.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.3.0/parameter.json" + } + ] }, "description": "JSON objects describing re-usable channel parameters.", "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/definitions/2.4.0/channelItem.json b/definitions/2.4.0/channelItem.json index 40c44f06..d57926df 100644 --- a/definitions/2.4.0/channelItem.json +++ b/definitions/2.4.0/channelItem.json @@ -11,10 +11,7 @@ "$ref": "http://asyncapi.com/definitions/2.4.0/ReferenceObject.json" }, "parameters": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.4.0/parameter.json" - } + "$ref": "http://asyncapi.com/definitions/2.4.0/parameters.json" }, "description": { "type": "string", diff --git a/definitions/2.4.0/parameters.json b/definitions/2.4.0/parameters.json index dfd22665..632525a9 100644 --- a/definitions/2.4.0/parameters.json +++ b/definitions/2.4.0/parameters.json @@ -1,7 +1,14 @@ { "type": "object", "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.4.0/parameter.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/2.4.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/2.4.0/parameter.json" + } + ] }, "description": "JSON objects describing re-usable channel parameters.", "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/definitions/2.5.0/channelItem.json b/definitions/2.5.0/channelItem.json index bc3eb667..b7146087 100644 --- a/definitions/2.5.0/channelItem.json +++ b/definitions/2.5.0/channelItem.json @@ -11,10 +11,7 @@ "$ref": "http://asyncapi.com/definitions/2.5.0/ReferenceObject.json" }, "parameters": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.5.0/parameter.json" - } + "$ref": "http://asyncapi.com/definitions/2.5.0/parameters.json" }, "description": { "type": "string", diff --git a/definitions/2.6.0/channelItem.json b/definitions/2.6.0/channelItem.json index b57ea97c..4fb12585 100644 --- a/definitions/2.6.0/channelItem.json +++ b/definitions/2.6.0/channelItem.json @@ -11,10 +11,7 @@ "$ref": "http://asyncapi.com/definitions/2.6.0/ReferenceObject.json" }, "parameters": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.6.0/parameter.json" - } + "$ref": "http://asyncapi.com/definitions/2.6.0/parameters.json" }, "description": { "type": "string", From f17105fb931379867d6bf4856a6bab2458a5611c Mon Sep 17 00:00:00 2001 From: Matatjahu Date: Mon, 6 Feb 2023 14:03:41 +0100 Subject: [PATCH 2/2] fix rcs --- definitions/2.0.0-rc1/channelItem.json | 7 +------ definitions/2.0.0-rc2/channelItem.json | 5 +---- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/definitions/2.0.0-rc1/channelItem.json b/definitions/2.0.0-rc1/channelItem.json index 94a67bb2..86588d37 100644 --- a/definitions/2.0.0-rc1/channelItem.json +++ b/definitions/2.0.0-rc1/channelItem.json @@ -12,12 +12,7 @@ "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/ReferenceObject.json" }, "parameters": { - "type": "array", - "uniqueItems": true, - "minItems": 1, - "items": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/parameter.json" - } + "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/parameters.json" }, "publish": { "$ref": "http://asyncapi.com/definitions/2.0.0-rc1/operation.json" diff --git a/definitions/2.0.0-rc2/channelItem.json b/definitions/2.0.0-rc2/channelItem.json index 8ec400a3..307caab5 100644 --- a/definitions/2.0.0-rc2/channelItem.json +++ b/definitions/2.0.0-rc2/channelItem.json @@ -12,10 +12,7 @@ "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/ReferenceObject.json" }, "parameters": { - "type": "object", - "additionalProperties": { - "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/parameter.json" - } + "$ref": "http://asyncapi.com/definitions/2.0.0-rc2/parameters.json" }, "description": { "type": "string",