From ffbd4d1bbb6eedc5e8976255442e854098051341 Mon Sep 17 00:00:00 2001 From: Dale Lane Date: Thu, 14 Mar 2024 10:07:56 +0000 Subject: [PATCH] fix: kafka bindings not using latest version cf. spotted in a comment in https://github.com/asyncapi/spec-json-schemas/pull/481 Signed-off-by: Dale Lane --- definitions/3.0.0/channelBindingsObject.json | 17 +++++++++++++++-- definitions/3.0.0/messageBindingsObject.json | 17 +++++++++++++++-- definitions/3.0.0/operationBindingsObject.json | 15 ++++++++++++++- definitions/3.0.0/serverBindingsObject.json | 15 ++++++++++++++- 4 files changed, 58 insertions(+), 6 deletions(-) diff --git a/definitions/3.0.0/channelBindingsObject.json b/definitions/3.0.0/channelBindingsObject.json index 490e5b35..54466b49 100644 --- a/definitions/3.0.0/channelBindingsObject.json +++ b/definitions/3.0.0/channelBindingsObject.json @@ -84,7 +84,7 @@ "kafka": { "properties": { "bindingVersion": { - "enum": ["0.4.0", "0.3.0"] + "enum": ["0.5.0", "0.4.0", "0.3.0"] } }, "allOf": [ @@ -98,7 +98,20 @@ } }, "then": { - "$ref": "http://asyncapi.com/bindings/kafka/0.4.0/channel.json" + "$ref": "http://asyncapi.com/bindings/kafka/0.5.0/channel.json" + } + }, + { + "if": { + "required": [ "bindingVersion" ], + "properties": { + "bindingVersion": { + "const": "0.5.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.5.0/channel.json" } }, { diff --git a/definitions/3.0.0/messageBindingsObject.json b/definitions/3.0.0/messageBindingsObject.json index 8afae457..1ba3c582 100644 --- a/definitions/3.0.0/messageBindingsObject.json +++ b/definitions/3.0.0/messageBindingsObject.json @@ -131,7 +131,7 @@ "kafka": { "properties": { "bindingVersion": { - "enum": ["0.4.0", "0.3.0"] + "enum": ["0.5.0", "0.4.0", "0.3.0"] } }, "allOf": [ @@ -145,7 +145,20 @@ } }, "then": { - "$ref": "http://asyncapi.com/bindings/kafka/0.4.0/message.json" + "$ref": "http://asyncapi.com/bindings/kafka/0.5.0/message.json" + } + }, + { + "if": { + "required": [ "bindingVersion" ], + "properties": { + "bindingVersion": { + "const": "0.5.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.5.0/message.json" } }, { diff --git a/definitions/3.0.0/operationBindingsObject.json b/definitions/3.0.0/operationBindingsObject.json index 965354fd..26555d2d 100644 --- a/definitions/3.0.0/operationBindingsObject.json +++ b/definitions/3.0.0/operationBindingsObject.json @@ -145,7 +145,20 @@ } }, "then": { - "$ref": "http://asyncapi.com/bindings/kafka/0.4.0/operation.json" + "$ref": "http://asyncapi.com/bindings/kafka/0.5.0/operation.json" + } + }, + { + "if": { + "required": [ "bindingVersion" ], + "properties": { + "bindingVersion": { + "const": "0.5.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.5.0/operation.json" } }, { diff --git a/definitions/3.0.0/serverBindingsObject.json b/definitions/3.0.0/serverBindingsObject.json index 93ca6afc..2e65a2a0 100644 --- a/definitions/3.0.0/serverBindingsObject.json +++ b/definitions/3.0.0/serverBindingsObject.json @@ -64,7 +64,20 @@ } }, "then": { - "$ref": "http://asyncapi.com/bindings/kafka/0.4.0/server.json" + "$ref": "http://asyncapi.com/bindings/kafka/0.5.0/server.json" + } + }, + { + "if": { + "required": [ "bindingVersion" ], + "properties": { + "bindingVersion": { + "const": "0.5.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.5.0/server.json" } }, {