Skip to content

Commit

Permalink
feat: adapt Kafka bindings to v3
Browse files Browse the repository at this point in the history
Signed-off-by: Laurent Broudoux <[email protected]>
  • Loading branch information
lbroudoux committed Nov 10, 2023
1 parent 18ccc41 commit 5030531
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 20 deletions.
17 changes: 15 additions & 2 deletions definitions/3.0.0/channelBindingsObject.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"kafka": {
"properties": {
"bindingVersion": {
"enum": ["0.4.0", "0.3.0"]
"enum": ["v3-0.4.0", "0.4.0", "0.3.0"]
}
},
"allOf": [
Expand All @@ -98,7 +98,20 @@
}
},
"then": {
"$ref": "http://asyncapi.com/bindings/kafka/0.4.0/channel.json"
"$ref": "http://asyncapi.com/bindings/kafka/v3-0.4.0/channel.json"
}
},
{
"if": {
"required": [ "bindingVersion" ],
"properties": {
"bindingVersion": {
"const": "v3-0.4.0"
}
}
},
"then": {
"$ref": "http://asyncapi.com/bindings/kafka/v3-0.4.0/channel.json"
}
},
{
Expand Down
16 changes: 8 additions & 8 deletions definitions/3.0.0/messageBindingsObject.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
"kafka": {
"properties": {
"bindingVersion": {
"enum": ["0.4.0", "0.3.0", "0.1.0"]
"enum": ["v3-0.4.0", "0.4.0", "0.3.0"]
}
},
"allOf": [
Expand All @@ -132,46 +132,46 @@
}
},
"then": {
"$ref": "http://asyncapi.com/bindings/kafka/0.4.0/message.json"
"$ref": "http://asyncapi.com/bindings/kafka/v3-0.4.0/message.json"
}
},
{
"if": {
"required": [ "bindingVersion" ],
"properties": {
"bindingVersion": {
"const": "0.4.0"
"const": "v3-0.4.0"
}
}
},
"then": {
"$ref": "http://asyncapi.com/bindings/kafka/0.4.0/message.json"
"$ref": "http://asyncapi.com/bindings/kafka/v3-0.4.0/message.json"
}
},
{
"if": {
"required": [ "bindingVersion" ],
"properties": {
"bindingVersion": {
"const": "0.3.0"
"const": "0.4.0"
}
}
},
"then": {
"$ref": "http://asyncapi.com/bindings/kafka/0.3.0/message.json"
"$ref": "http://asyncapi.com/bindings/kafka/0.4.0/message.json"
}
},
{
"if": {
"required": [ "bindingVersion" ],
"properties": {
"bindingVersion": {
"const": "0.1.0"
"const": "0.3.0"
}
}
},
"then": {
"$ref": "http://asyncapi.com/bindings/kafka/0.1.0/message.json"
"$ref": "http://asyncapi.com/bindings/kafka/0.3.0/message.json"
}
}
]
Expand Down
16 changes: 8 additions & 8 deletions definitions/3.0.0/operationBindingsObject.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
"kafka": {
"properties": {
"bindingVersion": {
"enum": ["0.4.0", "0.3.0", "0.1.0"]
"enum": ["v3-0.4.0", "0.4.0", "0.3.0"]
}
},
"allOf": [
Expand All @@ -132,46 +132,46 @@
}
},
"then": {
"$ref": "http://asyncapi.com/bindings/kafka/0.4.0/operation.json"
"$ref": "http://asyncapi.com/bindings/kafka/v3-0.4.0/operation.json"
}
},
{
"if": {
"required": [ "bindingVersion" ],
"properties": {
"bindingVersion": {
"const": "0.4.0"
"const": "v3-0.4.0"
}
}
},
"then": {
"$ref": "http://asyncapi.com/bindings/kafka/0.4.0/operation.json"
"$ref": "http://asyncapi.com/bindings/kafka/v3-0.4.0/operation.json"
}
},
{
"if": {
"required": [ "bindingVersion" ],
"properties": {
"bindingVersion": {
"const": "0.3.0"
"const": "0.4.0"
}
}
},
"then": {
"$ref": "http://asyncapi.com/bindings/kafka/0.3.0/operation.json"
"$ref": "http://asyncapi.com/bindings/kafka/0.4.0/operation.json"
}
},
{
"if": {
"required": [ "bindingVersion" ],
"properties": {
"bindingVersion": {
"const": "0.1.0"
"const": "0.3.0"
}
}
},
"then": {
"$ref": "http://asyncapi.com/bindings/kafka/0.1.0/operation.json"
"$ref": "http://asyncapi.com/bindings/kafka/0.3.0/operation.json"
}
}
]
Expand Down
17 changes: 15 additions & 2 deletions definitions/3.0.0/serverBindingsObject.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"kafka": {
"properties": {
"bindingVersion": {
"enum": ["0.4.0", "0.3.0"]
"enum": ["v3-0.4.0", "0.4.0", "0.3.0"]
}
},
"allOf": [
Expand All @@ -98,7 +98,20 @@
}
},
"then": {
"$ref": "http://asyncapi.com/bindings/kafka/0.4.0/server.json"
"$ref": "http://asyncapi.com/bindings/kafka/v3-0.4.0/server.json"
}
},
{
"if": {
"required": [ "bindingVersion" ],
"properties": {
"bindingVersion": {
"const": "v3-0.4.0"
}
}
},
"then": {
"$ref": "http://asyncapi.com/bindings/kafka/v3-0.4.0/server.json"
}
},
{
Expand Down

0 comments on commit 5030531

Please sign in to comment.