CloudEvents Asyncapi example #yaml
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
asyncapi: '2.0.0' | |
id: 'urn:io.microcks.example.user-signedup' | |
info: | |
title: User signed-up CloudEvents API binary | |
version: 0.1.3 | |
channels: | |
user/signedup: | |
subscribe: | |
message: | |
bindings: | |
kafka: | |
key: | |
type: string | |
description: Timestamp of event as milliseconds since 1st Jan 1970 | |
traits: | |
- $ref: 'https://raw.githubusercontent.com/microcks/microcks-quickstarters/main/cloud/cloudevents/cloudevents-v1.0.1-asyncapi-trait.yml' | |
headers: | |
type: object | |
properties: | |
custom-header: | |
type: string | |
contentType: avro/binary | |
schemaFormat: application/vnd.apache.avro+json;version=1.9.0 | |
payload: | |
$ref: './user-signedup.avsc#/User' | |
examples: | |
- john: | |
summary: Example for John Doe user | |
headers: | |
ce_specversion: "1.0" | |
ce_type: "io.microcks.example.user-signedup" | |
ce_source: "/mycontext/subcontext" | |
ce_id: "{{uuid()}}" | |
ce_time: "{{now(yyyy-MM-dd'T'HH:mm:SS'Z')}}" | |
content-type: application/avro | |
sentAt: "2020-03-11T08:03:38Z" | |
payload: | |
fullName: John Doe | |
email: john@microcks.io | |
age: 36 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment