Skip to content

Commit

Permalink
feat(kafka): add AVRO type in message key binding (#81)
Browse files Browse the repository at this point in the history
* feat(kafka): add AVRO type in message key binding

Refer to asyncapi/avro-schema-parser#67

* Update kafka/README.md

Co-authored-by: Fran Méndez <[email protected]>

Co-authored-by: Fran Méndez <[email protected]>
  • Loading branch information
M3lkior and fmvilas authored Sep 15, 2021
1 parent db40084 commit 68f9b2f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kafka/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This document defines how to describe Kafka-specific information on AsyncAPI.

## Version

Current version is `0.1.0`.
Current version is `0.2.0`.


<a name="server"></a>
Expand Down Expand Up @@ -69,7 +69,7 @@ This object contains information about the message representation in Kafka.
Field Name | Type | Description
---|:---:|---
<a name="messageBindingObjectKey"></a>`key` | [Schema Object][schemaObject] | The message key.
<a name="messageBindingObjectKey"></a>`key` | [Schema Object][schemaObject] \| [AVRO Schema Object](https://avro.apache.org/docs/current/spec.html) | The message key. **NOTE**: You can also use the [reference object](https://asyncapi.io/docs/specifications/v2.1.0#referenceObject) way.
<a name="messageBindingObjectBindingVersion"></a>`bindingVersion` | string | The version of this binding. If omitted, "latest" MUST be assumed.

This object MUST contain only the properties defined above.
Expand Down
6 changes: 6 additions & 0 deletions kafka/json_schemas/message.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@
]
},
"bindingVersion": "0.1.0"
},
{
"key": {
"$ref": "path/to/user-create.avsc#/UserCreate"
},
"bindingVersion": "0.2.0"
}
]
}

0 comments on commit 68f9b2f

Please sign in to comment.