Skip to content

Instantly share code, notes, and snippets.

@lbroudoux

lbroudoux/asyncapi-ce.yaml

Last active Apr 13, 2021
Embed
What would you like to do?
CloudEvent AsyncAPI structured sample #yaml
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