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 142fcd98..1ba3c582 100644 --- a/definitions/3.0.0/messageBindingsObject.json +++ b/definitions/3.0.0/messageBindingsObject.json @@ -25,7 +25,7 @@ } }, "then": { - "$ref": "http://asyncapi.com/bindings/http/0.2.0/message.json" + "$ref": "http://asyncapi.com/bindings/http/0.3.0/message.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" } }, { @@ -325,4 +338,4 @@ }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json" -} \ No newline at end of file +} diff --git a/definitions/3.0.0/operationBindingsObject.json b/definitions/3.0.0/operationBindingsObject.json index 9d0bede0..26555d2d 100644 --- a/definitions/3.0.0/operationBindingsObject.json +++ b/definitions/3.0.0/operationBindingsObject.json @@ -25,7 +25,7 @@ } }, "then": { - "$ref": "http://asyncapi.com/bindings/http/0.2.0/operation.json" + "$ref": "http://asyncapi.com/bindings/http/0.3.0/operation.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" } }, { @@ -351,4 +364,4 @@ }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json" -} \ No newline at end of file +} 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" } }, { diff --git a/package-lock.json b/package-lock.json index 3a033a8e..4e17dbf3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@asyncapi/specs", - "version": "6.5.0", + "version": "6.5.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@asyncapi/specs", - "version": "6.5.0", + "version": "6.5.3", "license": "Apache-2.0", "dependencies": { "@types/json-schema": "^7.0.11" diff --git a/package.json b/package.json index 29767fb8..3aecff62 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "6.5.0", + "version": "6.5.3", "description": "AsyncAPI schema versions", "main": "index.js", "types": "index.d.ts", diff --git a/schemas/3.0.0-without-$id.json b/schemas/3.0.0-without-$id.json index 2c69576d..ea001316 100644 --- a/schemas/3.0.0-without-$id.json +++ b/schemas/3.0.0-without-$id.json @@ -1227,7 +1227,22 @@ } }, "then": { - "$ref": "#/definitions/bindings-kafka-0.4.0-server" + "$ref": "#/definitions/bindings-kafka-0.5.0-server" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.5.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings-kafka-0.5.0-server" } }, { @@ -1914,6 +1929,41 @@ }, "default": true }, + "bindings-kafka-0.5.0-server": { + "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\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "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.5.0" + ], + "description": "The version of this binding." + } + }, + "examples": [ + { + "schemaRegistryUrl": "https://my-schema-registry.com", + "schemaRegistryVendor": "confluent", + "bindingVersion": "0.5.0" + } + ] + }, "bindings-kafka-0.4.0-server": { "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.", @@ -3532,7 +3582,7 @@ } }, "then": { - "$ref": "#/definitions/bindings-http-0.2.0-message" + "$ref": "#/definitions/bindings-http-0.3.0-message" } }, { @@ -3651,6 +3701,7 @@ "properties": { "bindingVersion": { "enum": [ + "0.5.0", "0.4.0", "0.3.0" ] @@ -3667,7 +3718,22 @@ } }, "then": { - "$ref": "#/definitions/bindings-kafka-0.4.0-message" + "$ref": "#/definitions/bindings-kafka-0.5.0-message" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.5.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings-kafka-0.5.0-message" } }, { @@ -3866,7 +3932,7 @@ } } }, - "bindings-http-0.2.0-message": { + "bindings-http-0.3.0-message": { "title": "HTTP message bindings object", "description": "This object contains information about the message representation in HTTP.", "type": "object", @@ -3881,10 +3947,14 @@ "$ref": "#/definitions/schema", "description": "\tA Schema object containing the definitions for HTTP-specific headers. This schema MUST be of type 'object' and have a 'properties' key." }, + "statusCode": { + "type": "number", + "description": "The HTTP response status code according to [RFC 9110](https://httpwg.org/specs/rfc9110.html#overview.of.status.codes). `statusCode` is only relevant for messages referenced by the [Operation Reply Object](https://www.asyncapi.com/docs/reference/specification/v3.0.0#operationReplyObject), as it defines the status code for the response. In all other cases, this value can be safely ignored." + }, "bindingVersion": { "type": "string", "enum": [ - "0.2.0" + "0.3.0" ], "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." } @@ -3902,11 +3972,11 @@ } } }, - "bindingVersion": "0.2.0" + "bindingVersion": "0.3.0" } ] }, - "bindings-http-0.3.0-message": { + "bindings-http-0.2.0-message": { "title": "HTTP message bindings object", "description": "This object contains information about the message representation in HTTP.", "type": "object", @@ -3921,14 +3991,10 @@ "$ref": "#/definitions/schema", "description": "\tA Schema object containing the definitions for HTTP-specific headers. This schema MUST be of type 'object' and have a 'properties' key." }, - "statusCode": { - "type": "number", - "description": "The HTTP response status code according to [RFC 9110](https://httpwg.org/specs/rfc9110.html#overview.of.status.codes). `statusCode` is only relevant for messages referenced by the [Operation Reply Object](https://www.asyncapi.com/docs/reference/specification/v3.0.0#operationReplyObject), as it defines the status code for the response. In all other cases, this value can be safely ignored." - }, "bindingVersion": { "type": "string", "enum": [ - "0.3.0" + "0.2.0" ], "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." } @@ -3946,7 +4012,7 @@ } } }, - "bindingVersion": "0.3.0" + "bindingVersion": "0.2.0" } ] }, @@ -4059,6 +4125,74 @@ } ] }, + "bindings-kafka-0.5.0-message": { + "title": "Message Schema", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "key": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/schema" + } + ], + "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.5.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.5.0" + }, + { + "key": { + "$ref": "path/to/user-create.avsc#/UserCreate" + }, + "schemaIdLocation": "payload", + "schemaIdPayloadEncoding": "4", + "bindingVersion": "0.5.0" + } + ] + }, "bindings-kafka-0.4.0-message": { "title": "Message Schema", "type": "object", @@ -4720,6 +4854,7 @@ "properties": { "bindingVersion": { "enum": [ + "0.5.0", "0.4.0", "0.3.0" ] @@ -4736,7 +4871,22 @@ } }, "then": { - "$ref": "#/definitions/bindings-kafka-0.4.0-channel" + "$ref": "#/definitions/bindings-kafka-0.5.0-channel" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.5.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings-kafka-0.5.0-channel" } }, { @@ -5253,6 +5403,102 @@ } ] }, + "bindings-kafka-0.5.0-channel": { + "title": "Channel Schema", + "description": "This object contains information about the channel representation in Kafka.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "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": true, + "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 + }, + "confluent.key.schema.validation": { + "description": "It shows whether the schema validation for the message key is enabled. Vendor specific config. For more details: (https://docs.confluent.io/platform/current/installation/configuration/topic-configs.html#confluent-key-schema-validation)", + "type": "boolean" + }, + "confluent.key.subject.name.strategy": { + "description": "The name of the schema lookup strategy for the message key. Vendor specific config. For more details: (https://docs.confluent.io/platform/current/installation/configuration/topic-configs.html#confluent-key-subject-name-strategy)", + "type": "string" + }, + "confluent.value.schema.validation": { + "description": "It shows whether the schema validation for the message value is enabled. Vendor specific config. For more details: (https://docs.confluent.io/platform/current/installation/configuration/topic-configs.html#confluent-value-schema-validation)", + "type": "boolean" + }, + "confluent.value.subject.name.strategy": { + "description": "The name of the schema lookup strategy for the message value. Vendor specific config. For more details: (https://docs.confluent.io/platform/current/installation/configuration/topic-configs.html#confluent-value-subject-name-strategy)", + "type": "string" + } + } + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.5.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "topic": "my-specific-topic", + "partitions": 20, + "replicas": 3, + "bindingVersion": "0.5.0" + } + ] + }, "bindings-kafka-0.4.0-channel": { "title": "Channel Schema", "description": "This object contains information about the channel representation in Kafka.", @@ -6537,7 +6783,7 @@ } }, "then": { - "$ref": "#/definitions/bindings-http-0.2.0-operation" + "$ref": "#/definitions/bindings-http-0.3.0-operation" } }, { @@ -6672,7 +6918,22 @@ } }, "then": { - "$ref": "#/definitions/bindings-kafka-0.4.0-operation" + "$ref": "#/definitions/bindings-kafka-0.5.0-operation" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.5.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings-kafka-0.5.0-operation" } }, { @@ -6903,7 +7164,7 @@ "googlepubsub": {} } }, - "bindings-http-0.2.0-operation": { + "bindings-http-0.3.0-operation": { "title": "HTTP operation bindings object", "description": "This object contains information about the operation representation in HTTP.", "type": "object", @@ -6936,7 +7197,7 @@ "bindingVersion": { "type": "string", "enum": [ - "0.2.0" + "0.3.0" ], "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } @@ -6957,7 +7218,7 @@ }, "additionalProperties": false }, - "bindingVersion": "0.2.0" + "bindingVersion": "0.3.0" }, { "method": "GET", @@ -6975,11 +7236,11 @@ }, "additionalProperties": false }, - "bindingVersion": "0.2.0" + "bindingVersion": "0.3.0" } ] }, - "bindings-http-0.3.0-operation": { + "bindings-http-0.2.0-operation": { "title": "HTTP operation bindings object", "description": "This object contains information about the operation representation in HTTP.", "type": "object", @@ -7012,7 +7273,7 @@ "bindingVersion": { "type": "string", "enum": [ - "0.3.0" + "0.2.0" ], "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } @@ -7033,7 +7294,7 @@ }, "additionalProperties": false }, - "bindingVersion": "0.3.0" + "bindingVersion": "0.2.0" }, { "method": "GET", @@ -7051,7 +7312,7 @@ }, "additionalProperties": false }, - "bindingVersion": "0.3.0" + "bindingVersion": "0.2.0" } ] }, @@ -7197,6 +7458,51 @@ } ] }, + "bindings-kafka-0.5.0-operation": { + "title": "Operation Schema", + "description": "This object contains information about the operation representation in Kafka.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "groupId": { + "$ref": "#/definitions/schema", + "description": "Id of the consumer group." + }, + "clientId": { + "$ref": "#/definitions/schema", + "description": "Id of the consumer inside a consumer group." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.5.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.5.0" + } + ] + }, "bindings-kafka-0.4.0-operation": { "title": "Operation Schema", "description": "This object contains information about the operation representation in Kafka.", diff --git a/schemas/3.0.0.json b/schemas/3.0.0.json index 97d236f7..ac7e7aab 100644 --- a/schemas/3.0.0.json +++ b/schemas/3.0.0.json @@ -1260,7 +1260,22 @@ } }, "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" } }, { @@ -1950,6 +1965,42 @@ }, "default": true }, + "http://asyncapi.com/bindings/kafka/0.5.0/server.json": { + "$id": "http://asyncapi.com/bindings/kafka/0.5.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\\.\\x2d_]+$": { + "$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.5.0" + ], + "description": "The version of this binding." + } + }, + "examples": [ + { + "schemaRegistryUrl": "https://my-schema-registry.com", + "schemaRegistryVendor": "confluent", + "bindingVersion": "0.5.0" + } + ] + }, "http://asyncapi.com/bindings/kafka/0.4.0/server.json": { "$id": "http://asyncapi.com/bindings/kafka/0.4.0/server.json", "title": "Server Schema", @@ -3586,7 +3637,7 @@ } }, "then": { - "$ref": "http://asyncapi.com/bindings/http/0.2.0/message.json" + "$ref": "http://asyncapi.com/bindings/http/0.3.0/message.json" } }, { @@ -3705,6 +3756,7 @@ "properties": { "bindingVersion": { "enum": [ + "0.5.0", "0.4.0", "0.3.0" ] @@ -3721,7 +3773,22 @@ } }, "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" } }, { @@ -3920,8 +3987,8 @@ } } }, - "http://asyncapi.com/bindings/http/0.2.0/message.json": { - "$id": "http://asyncapi.com/bindings/http/0.2.0/message.json", + "http://asyncapi.com/bindings/http/0.3.0/message.json": { + "$id": "http://asyncapi.com/bindings/http/0.3.0/message.json", "title": "HTTP message bindings object", "description": "This object contains information about the message representation in HTTP.", "type": "object", @@ -3936,10 +4003,14 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", "description": "\tA Schema object containing the definitions for HTTP-specific headers. This schema MUST be of type 'object' and have a 'properties' key." }, + "statusCode": { + "type": "number", + "description": "The HTTP response status code according to [RFC 9110](https://httpwg.org/specs/rfc9110.html#overview.of.status.codes). `statusCode` is only relevant for messages referenced by the [Operation Reply Object](https://www.asyncapi.com/docs/reference/specification/v3.0.0#operationReplyObject), as it defines the status code for the response. In all other cases, this value can be safely ignored." + }, "bindingVersion": { "type": "string", "enum": [ - "0.2.0" + "0.3.0" ], "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." } @@ -3957,12 +4028,12 @@ } } }, - "bindingVersion": "0.2.0" + "bindingVersion": "0.3.0" } ] }, - "http://asyncapi.com/bindings/http/0.3.0/message.json": { - "$id": "http://asyncapi.com/bindings/http/0.3.0/message.json", + "http://asyncapi.com/bindings/http/0.2.0/message.json": { + "$id": "http://asyncapi.com/bindings/http/0.2.0/message.json", "title": "HTTP message bindings object", "description": "This object contains information about the message representation in HTTP.", "type": "object", @@ -3977,14 +4048,10 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", "description": "\tA Schema object containing the definitions for HTTP-specific headers. This schema MUST be of type 'object' and have a 'properties' key." }, - "statusCode": { - "type": "number", - "description": "The HTTP response status code according to [RFC 9110](https://httpwg.org/specs/rfc9110.html#overview.of.status.codes). `statusCode` is only relevant for messages referenced by the [Operation Reply Object](https://www.asyncapi.com/docs/reference/specification/v3.0.0#operationReplyObject), as it defines the status code for the response. In all other cases, this value can be safely ignored." - }, "bindingVersion": { "type": "string", "enum": [ - "0.3.0" + "0.2.0" ], "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." } @@ -4002,7 +4069,7 @@ } } }, - "bindingVersion": "0.3.0" + "bindingVersion": "0.2.0" } ] }, @@ -4117,6 +4184,75 @@ } ] }, + "http://asyncapi.com/bindings/kafka/0.5.0/message.json": { + "$id": "http://asyncapi.com/bindings/kafka/0.5.0/message.json", + "title": "Message Schema", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "key": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$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.5.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.5.0" + }, + { + "key": { + "$ref": "path/to/user-create.avsc#/UserCreate" + }, + "schemaIdLocation": "payload", + "schemaIdPayloadEncoding": "4", + "bindingVersion": "0.5.0" + } + ] + }, "http://asyncapi.com/bindings/kafka/0.4.0/message.json": { "$id": "http://asyncapi.com/bindings/kafka/0.4.0/message.json", "title": "Message Schema", @@ -4788,6 +4924,7 @@ "properties": { "bindingVersion": { "enum": [ + "0.5.0", "0.4.0", "0.3.0" ] @@ -4804,7 +4941,22 @@ } }, "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" } }, { @@ -5323,6 +5475,103 @@ } ] }, + "http://asyncapi.com/bindings/kafka/0.5.0/channel.json": { + "$id": "http://asyncapi.com/bindings/kafka/0.5.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\\.\\x2d_]+$": { + "$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": true, + "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 + }, + "confluent.key.schema.validation": { + "description": "It shows whether the schema validation for the message key is enabled. Vendor specific config. For more details: (https://docs.confluent.io/platform/current/installation/configuration/topic-configs.html#confluent-key-schema-validation)", + "type": "boolean" + }, + "confluent.key.subject.name.strategy": { + "description": "The name of the schema lookup strategy for the message key. Vendor specific config. For more details: (https://docs.confluent.io/platform/current/installation/configuration/topic-configs.html#confluent-key-subject-name-strategy)", + "type": "string" + }, + "confluent.value.schema.validation": { + "description": "It shows whether the schema validation for the message value is enabled. Vendor specific config. For more details: (https://docs.confluent.io/platform/current/installation/configuration/topic-configs.html#confluent-value-schema-validation)", + "type": "boolean" + }, + "confluent.value.subject.name.strategy": { + "description": "The name of the schema lookup strategy for the message value. Vendor specific config. For more details: (https://docs.confluent.io/platform/current/installation/configuration/topic-configs.html#confluent-value-subject-name-strategy)", + "type": "string" + } + } + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.5.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "topic": "my-specific-topic", + "partitions": 20, + "replicas": 3, + "bindingVersion": "0.5.0" + } + ] + }, "http://asyncapi.com/bindings/kafka/0.4.0/channel.json": { "$id": "http://asyncapi.com/bindings/kafka/0.4.0/channel.json", "title": "Channel Schema", @@ -6622,7 +6871,7 @@ } }, "then": { - "$ref": "http://asyncapi.com/bindings/http/0.2.0/operation.json" + "$ref": "http://asyncapi.com/bindings/http/0.3.0/operation.json" } }, { @@ -6757,7 +7006,22 @@ } }, "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" } }, { @@ -6988,8 +7252,8 @@ "googlepubsub": {} } }, - "http://asyncapi.com/bindings/http/0.2.0/operation.json": { - "$id": "http://asyncapi.com/bindings/http/0.2.0/operation.json", + "http://asyncapi.com/bindings/http/0.3.0/operation.json": { + "$id": "http://asyncapi.com/bindings/http/0.3.0/operation.json", "title": "HTTP operation bindings object", "description": "This object contains information about the operation representation in HTTP.", "type": "object", @@ -7022,7 +7286,7 @@ "bindingVersion": { "type": "string", "enum": [ - "0.2.0" + "0.3.0" ], "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } @@ -7043,7 +7307,7 @@ }, "additionalProperties": false }, - "bindingVersion": "0.2.0" + "bindingVersion": "0.3.0" }, { "method": "GET", @@ -7061,12 +7325,12 @@ }, "additionalProperties": false }, - "bindingVersion": "0.2.0" + "bindingVersion": "0.3.0" } ] }, - "http://asyncapi.com/bindings/http/0.3.0/operation.json": { - "$id": "http://asyncapi.com/bindings/http/0.3.0/operation.json", + "http://asyncapi.com/bindings/http/0.2.0/operation.json": { + "$id": "http://asyncapi.com/bindings/http/0.2.0/operation.json", "title": "HTTP operation bindings object", "description": "This object contains information about the operation representation in HTTP.", "type": "object", @@ -7099,7 +7363,7 @@ "bindingVersion": { "type": "string", "enum": [ - "0.3.0" + "0.2.0" ], "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } @@ -7120,7 +7384,7 @@ }, "additionalProperties": false }, - "bindingVersion": "0.3.0" + "bindingVersion": "0.2.0" }, { "method": "GET", @@ -7138,7 +7402,7 @@ }, "additionalProperties": false }, - "bindingVersion": "0.3.0" + "bindingVersion": "0.2.0" } ] }, @@ -7286,6 +7550,52 @@ } ] }, + "http://asyncapi.com/bindings/kafka/0.5.0/operation.json": { + "$id": "http://asyncapi.com/bindings/kafka/0.5.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\\.\\x2d_]+$": { + "$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.5.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.5.0" + } + ] + }, "http://asyncapi.com/bindings/kafka/0.4.0/operation.json": { "$id": "http://asyncapi.com/bindings/kafka/0.4.0/operation.json", "title": "Operation Schema",