Last active
April 13, 2021 12:44
-
-
Save lbroudoux/035ccc4d7b7cdd414f0ebc5a53e80c4c to your computer and use it in GitHub Desktop.
CloudEvent AsyncAPI structured sample #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 structured | |
version: 0.1.3 | |
defaultContentType: application/json | |
channels: | |
user/signedup: | |
subscribe: | |
message: | |
bindings: | |
kafka: | |
key: | |
type: string | |
description: Timestamp of event as milliseconds since 1st Jan 1970 | |
headers: | |
type: object | |
properties: | |
custom-header: | |
type: string | |
content-type: | |
type: string | |
enum: | |
- 'application/cloudevents+json; charset=UTF-8' | |
payload: | |
$ref: '#/components/schemas/userSignedUpPayload' | |
examples: [...] | |
components: | |
schemas: | |
userSignedUpPayload: | |
type: object | |
allOf: | |
- $ref: 'https://raw.githubusercontent.com/cloudevents/spec/v1.0.1/spec.json' | |
properties: | |
data: | |
$ref: '#/components/schemas/userSignedUpData' | |
userSignedUpData: | |
type: object | |
properties: | |
fullName: | |
type: string | |
email: | |
type: string | |
format: email | |
age: | |
type: integer | |
minimum: 18 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment