From 39b373ae8a61001370482108850231b4bc94c70d Mon Sep 17 00:00:00 2001 From: jonaslagoni Date: Fri, 3 Feb 2023 00:03:13 +0100 Subject: [PATCH] add missing changes --- bindings/ibmmq/0.1.0/channel.json | 3 -- bindings/kafka/0.4.0/channel.json | 80 +++++++++++++++++++++++++++++ bindings/kafka/0.4.0/message.json | 61 ++++++++++++++++++++++ bindings/kafka/0.4.0/operation.json | 47 +++++++++++++++++ bindings/kafka/0.4.0/server.json | 37 +++++++++++++ bindings/mqtt5/.keep | 0 bindings/mqtt5/0.2.0/server.json | 53 +++++++++++++++++++ 7 files changed, 278 insertions(+), 3 deletions(-) create mode 100644 bindings/kafka/0.4.0/channel.json create mode 100644 bindings/kafka/0.4.0/message.json create mode 100644 bindings/kafka/0.4.0/operation.json create mode 100644 bindings/kafka/0.4.0/server.json delete mode 100644 bindings/mqtt5/.keep create mode 100644 bindings/mqtt5/0.2.0/server.json diff --git a/bindings/ibmmq/0.1.0/channel.json b/bindings/ibmmq/0.1.0/channel.json index 85ea1a14..dabc2b45 100644 --- a/bindings/ibmmq/0.1.0/channel.json +++ b/bindings/ibmmq/0.1.0/channel.json @@ -84,9 +84,6 @@ "properties": { "destinationType": { "const": "topic" } }, - "required": [ - "topic" - ], "not": { "required": [ "queue" diff --git a/bindings/kafka/0.4.0/channel.json b/bindings/kafka/0.4.0/channel.json new file mode 100644 index 00000000..a072d922 --- /dev/null +++ b/bindings/kafka/0.4.0/channel.json @@ -0,0 +1,80 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/kafka/0.4.0/channel.json", + "title": "Channel Schema", + "description": "This object contains information about the channel representation in Kafka.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "topic": { + "type": "string", + "description": "Kafka topic name if different from channel name." + }, + "partitions": { + "type": "integer", + "minimum": 1, + "description": "Number of partitions configured on this topic." + }, + "replicas": { + "type": "integer", + "minimum": 1, + "description": "Number of replicas configured on this topic." + }, + "topicConfiguration" : { + "description": "Topic configuration properties that are relevant for the API.", + "type": "object", + "additionalProperties": false, + "properties": { + "cleanup.policy": { + "description": "The [`cleanup.policy`](https://kafka.apache.org/documentation/#topicconfigs_cleanup.policy) configuration option.", + "type": "array", + "items":{ + "type": "string", + "enum": ["compact", "delete"] + } + }, + "retention.ms": { + "description": "The [`retention.ms`](https://kafka.apache.org/documentation/#topicconfigs_retention.ms) configuration option.", + "type": "integer", + "minimum": -1 + }, + "retention.bytes": { + "description": "The [`retention.bytes`](https://kafka.apache.org/documentation/#topicconfigs_retention.bytes) configuration option.", + "type": "integer", + "minimum": -1 + }, + "delete.retention.ms": { + "description": "The [`delete.retention.ms`](https://kafka.apache.org/documentation/#topicconfigs_delete.retention.ms) configuration option.", + "type": "integer", + "minimum": 0 + }, + "max.message.bytes": { + "description": "The [`max.message.bytes`](https://kafka.apache.org/documentation/#topicconfigs_max.message.bytes) configuration option.", + "type": "integer", + "minimum": 0 + } + } + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.4.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + + }, + "examples": [ + { + "topic": "my-specific-topic", + "partitions": 20, + "replicas": 3, + "bindingVersion": "0.4.0" + } + ] +} diff --git a/bindings/kafka/0.4.0/message.json b/bindings/kafka/0.4.0/message.json new file mode 100644 index 00000000..ba3f54ef --- /dev/null +++ b/bindings/kafka/0.4.0/message.json @@ -0,0 +1,61 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/kafka/0.4.0/message.json", + "title": "Message Schema", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "key": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "The message key." + }, + "schemaIdLocation": { + "type": "string", + "description": "If a Schema Registry is used when performing this operation, tells where the id of schema is stored.", + "enum": ["header", "payload"] + }, + "schemaIdPayloadEncoding": { + "type": "string", + "description": "Number of bytes or vendor specific values when schema id is encoded in payload." + }, + "schemaLookupStrategy": { + "type": "string", + "description": "Freeform string for any naming strategy class to use. Clients should default to the vendor default if not supplied." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.4.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + + }, + "examples": [ + { + "key": { + "type": "string", + "enum": [ + "myKey" + ] + }, + "schemaIdLocation": "payload", + "schemaIdPayloadEncoding": "apicurio-new", + "schemaLookupStrategy": "TopicIdStrategy", + "bindingVersion": "0.4.0" + }, + { + "key": { + "$ref": "path/to/user-create.avsc#/UserCreate" + }, + "schemaIdLocation": "payload", + "schemaIdPayloadEncoding": "4", + "bindingVersion": "0.4.0" + } + ] +} diff --git a/bindings/kafka/0.4.0/operation.json b/bindings/kafka/0.4.0/operation.json new file mode 100644 index 00000000..2dbc5b99 --- /dev/null +++ b/bindings/kafka/0.4.0/operation.json @@ -0,0 +1,47 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/kafka/0.4.0/operation.json", + "title": "Operation Schema", + "description": "This object contains information about the operation representation in Kafka.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "groupId": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "Id of the consumer group." + }, + "clientId": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "Id of the consumer inside a consumer group." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.4.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "groupId": { + "type": "string", + "enum": [ + "myGroupId" + ] + }, + "clientId": { + "type": "string", + "enum": [ + "myClientId" + ] + }, + "bindingVersion": "0.4.0" + } + ] +} diff --git a/bindings/kafka/0.4.0/server.json b/bindings/kafka/0.4.0/server.json new file mode 100644 index 00000000..d583e130 --- /dev/null +++ b/bindings/kafka/0.4.0/server.json @@ -0,0 +1,37 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/kafka/0.4.0/server.json", + "title": "Server Schema", + "description": "This object contains server connection information to a Kafka broker. This object contains additional information not possible to represent within the core AsyncAPI specification.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "schemaRegistryUrl": { + "type": "string", + "description": "API URL for the Schema Registry used when producing Kafka messages (if a Schema Registry was used)." + }, + "schemaRegistryVendor": { + "type": "string", + "description": "The vendor of the Schema Registry and Kafka serdes library that should be used." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.4.0" + ], + "description": "The version of this binding." + } + }, + "examples": [ + { + "schemaRegistryUrl": "https://my-schema-registry.com", + "schemaRegistryVendor": "confluent", + "bindingVersion": "0.4.0" + } + ] +} \ No newline at end of file diff --git a/bindings/mqtt5/.keep b/bindings/mqtt5/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/bindings/mqtt5/0.2.0/server.json b/bindings/mqtt5/0.2.0/server.json new file mode 100644 index 00000000..7ec26256 --- /dev/null +++ b/bindings/mqtt5/0.2.0/server.json @@ -0,0 +1,53 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/mqtt5/0.1.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\\.\\-\\_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + + "sessionExpiryInterval": { + "oneOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + } + ], + "description": "Session Expiry Interval in seconds or a Schema Object containing the definition of the interval." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.2.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "sessionExpiryInterval": 60, + "bindingVersion": "0.2.0" + }, + { + "sessionExpiryInterval": { + "type": "integer", + "minimum": 100 + }, + "bindingVersion": "0.2.0" + } + ] + } + + \ No newline at end of file