From aed791ea849db319b9ba62061d480da23a9b1b4f Mon Sep 17 00:00:00 2001 From: Fabrizio Lazzaretti Date: Thu, 22 Feb 2024 12:26:31 +0100 Subject: [PATCH] docs: add example "Multi Format Schema Object Example with Avro" (#1032) Co-authored-by: Sergio Moya <1083296+smoya@users.noreply.github.com> --- spec/asyncapi.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/spec/asyncapi.md b/spec/asyncapi.md index 182c9a3c..4611f3b9 100644 --- a/spec/asyncapi.md +++ b/spec/asyncapi.md @@ -1814,6 +1814,29 @@ Name | Allowed values | Notes [RAML 1.0 data type](https://github.com/raml-org/raml-spec/blob/master/versions/raml-10/raml-10.md/) | `application/raml+yaml;version=1.0` | [Protocol Buffers](https://protobuf.dev/) | `application/vnd.google.protobuf;version=2`, `application/vnd.google.protobuf;version=3` | +##### Multi Format Schema Object Examples + +###### Multi Format Schema Object Example with Avro + +```yaml +channels: + example: + messages: + myMessage: + payload: + schemaFormat: 'application/vnd.apache.avro;version=1.9.0' + schema: + type: record + name: User + namespace: com.company + doc: User information + fields: + - name: displayName + type: string + - name: age + type: int +``` + #### Schema Object The Schema Object allows the definition of input and output data types.