Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support multiple binding versions #312

2 changes: 1 addition & 1 deletion bindings/kafka/0.4.0/channel.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^x-[\\w\\d\\.\\-\\_]+$": {
"^x-[\\w\\d\\.\\x2d_]+$": {
dalelane marked this conversation as resolved.
Show resolved Hide resolved
"$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json"
}
},
Expand Down
2 changes: 1 addition & 1 deletion bindings/kafka/0.4.0/message.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^x-[\\w\\d\\.\\-\\_]+$": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json"
}
},
Expand Down
2 changes: 1 addition & 1 deletion bindings/kafka/0.4.0/operation.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^x-[\\w\\d\\.\\-\\_]+$": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json"
}
},
Expand Down
2 changes: 1 addition & 1 deletion bindings/kafka/0.4.0/server.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^x-[\\w\\d\\.\\-\\_]+$": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json"
}
},
Expand Down
4 changes: 2 additions & 2 deletions bindings/mqtt5/0.2.0/server.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/bindings/mqtt5/0.1.0/server.json",
"$id": "http://asyncapi.com/bindings/mqtt5/0.2.0/server.json",
"title": "Server Schema",
"description": "This object contains information about the server representation in MQTT5.",
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^x-[\\w\\d\\.\\-\\_]+$": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json"
}
},
Expand Down
251 changes: 223 additions & 28 deletions definitions/3.0.0/channelBindingsObject.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,44 +9,158 @@
"properties": {
"http": {},
"ws": {
"oneOf": [
"properties": {
"bindingVersion": {
"enum": ["0.1.0"]
}
},
"allOf": [
{
"description": "If no bindingVersion specified, use the latest binding",
"if": {
"not": {
"required": [
"bindingVersion"
]
}
},
"then": {
"$ref": "http://asyncapi.com/bindings/websockets/0.1.0/channel.json"
}
},
{
"description": "Latest binding",
"$ref": "http://asyncapi.com/bindings/websockets/0.1.0/channel.json"
"if": {
"required": [ "bindingVersion" ],
"properties": {
"bindingVersion": {
"const": "0.1.0"
}
}
},
"then": {
"$ref": "http://asyncapi.com/bindings/websockets/0.1.0/channel.json"
}
}
]
},
"amqp": {
"oneOf": [
{
"description": "Latest binding",
"$ref": "http://asyncapi.com/bindings/amqp/0.2.0/channel.json"
"properties": {
"bindingVersion": {
"enum": ["0.2.0"]
}
]
},
"amqp1": {
"oneOf": [
},
"allOf": [
{
"description": "Latest binding",
"$ref": "http://asyncapi.com/bindings/amqp/0.2.0/channel.json"
"description": "If no bindingVersion specified, use the latest binding",
"if": {
"not": {
"required": [
"bindingVersion"
]
}
},
"then": {
"$ref": "http://asyncapi.com/bindings/amqp/0.2.0/channel.json"
}
},
{
"if": {
"required": [ "bindingVersion" ],
"properties": {
"bindingVersion": {
"const": "0.2.0"
}
}
},
"then": {
"$ref": "http://asyncapi.com/bindings/amqp/0.2.0/channel.json"
}
}
]
},
"amqp1": {},
"mqtt": {},
"mqtt5": {},
"kafka": {
"oneOf": [
"properties": {
"bindingVersion": {
"enum": ["0.4.0", "0.3.0"]
}
},
"allOf": [
{
"description": "If no bindingVersion specified, use the latest binding",
"if": {
"not": {
"required": [
"bindingVersion"
]
}
},
"then": {
"$ref": "http://asyncapi.com/bindings/kafka/0.4.0/channel.json"
}
},
{
"if": {
"required": [ "bindingVersion" ],
"properties": {
"bindingVersion": {
"const": "0.4.0"
}
}
},
"then": {
"$ref": "http://asyncapi.com/bindings/kafka/0.4.0/channel.json"
}
},
{
"description": "Latest binding",
"$ref": "http://asyncapi.com/bindings/kafka/0.3.0/channel.json"
"if": {
"required": [ "bindingVersion" ],
"properties": {
"bindingVersion": {
"const": "0.3.0"
}
}
},
"then": {
"$ref": "http://asyncapi.com/bindings/kafka/0.3.0/channel.json"
}
}
]
},
"anypointmq": {
"oneOf": [
"properties": {
"bindingVersion": {
"enum": ["0.0.1"]
}
},
"allOf": [
{
"description": "If no bindingVersion specified, use the latest binding",
"if": {
"not": {
"required": [
"bindingVersion"
]
}
},
"then": {
"$ref": "http://asyncapi.com/bindings/anypointmq/0.0.1/channel.json"
}
},
{
"description": "Latest binding",
"$ref": "http://asyncapi.com/bindings/anypointmq/0.0.1/channel.json"
"if": {
"required": [ "bindingVersion" ],
"properties": {
"bindingVersion": {
"const": "0.0.1"
}
}
},
"then": {
"$ref": "http://asyncapi.com/bindings/anypointmq/0.0.1/channel.json"
}
}
]
},
Expand All @@ -57,27 +171,108 @@
"stomp": {},
"redis": {},
"ibmmq": {
"oneOf": [
"properties": {
"bindingVersion": {
"enum": ["0.1.0"]
}
},
"allOf": [
{
"description": "If no bindingVersion specified, use the latest binding",
"if": {
"not": {
"required": [
"bindingVersion"
]
}
},
"then": {
"$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/channel.json"
}
},
{
"description": "Latest binding",
"$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/channel.json"
"if": {
"required": [ "bindingVersion" ],
"properties": {
"bindingVersion": {
"const": "0.1.0"
}
}
},
"then": {
"$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/channel.json"
}
}
]
},
"solace": {},
"googlepubsub": {
"oneOf": [
"properties": {
"bindingVersion": {
"enum": ["0.1.0"]
}
},
"allOf": [
{
"description": "If no bindingVersion specified, use the latest binding",
"if": {
"not": {
"required": [
"bindingVersion"
]
}
},
"then": {
"$ref": "http://asyncapi.com/bindings/googlepubsub/0.1.0/channel.json"
}
},
{
"description": "Latest binding",
"$ref": "http://asyncapi.com/bindings/googlepubsub/0.1.0/channel.json"
"if": {
"required": [ "bindingVersion" ],
"properties": {
"bindingVersion": {
"const": "0.1.0"
}
}
},
"then": {
"$ref": "http://asyncapi.com/bindings/googlepubsub/0.1.0/channel.json"
}
}
]
},
"pulsar": {
"oneOf": [
"properties": {
"bindingVersion": {
"enum": ["0.1.0"]
}
},
"allOf": [
{
"description": "If no bindingVersion specified, use the latest binding",
"if": {
"not": {
"required": [
"bindingVersion"
]
}
},
"then": {
"$ref": "http://asyncapi.com/bindings/pulsar/0.1.0/channel.json"
}
},
{
"description": "Latest binding",
"$ref": "http://asyncapi.com/bindings/pulsar/0.1.0/channel.json"
"if": {
"required": [ "bindingVersion" ],
"properties": {
"bindingVersion": {
"const": "0.1.0"
}
}
},
"then": {
"$ref": "http://asyncapi.com/bindings/pulsar/0.1.0/channel.json"
}
}
]
}
Expand Down
Loading