Skip to content

Instantly share code, notes, and snippets.

@WaleedAshraf
Last active September 6, 2019 15:33
Show Gist options
  • Save WaleedAshraf/e2b3198a8b9d8e3baa62bc800faf77f6 to your computer and use it in GitHub Desktop.
Save WaleedAshraf/e2b3198a8b9d8e3baa62bc800faf77f6 to your computer and use it in GitHub Desktop.
asyncapi: '2.0.0-rc2'
id: 'urn:demo'
info:
title: Demo
version: '1.0'
channels:
userEvents:
description: User Events Channel
publish:
summary: Publish User related events
message:
$ref: '#/components/messages/userCreated'
components:
messages:
userCreated:
name: userCreated
payload:
$ref: '#/components/schemas/userCreated'
schemas:
userCreated:
type: object
additionalProperties: false
properties:
id:
type: string
format: uuid
example: bd58d14f-fd3e-449c-b60c-a56548190d68
userName:
type: string
format: email
familyName:
type: string
example: Alex
givenName:
type: string
example: Jem
phoneNumber:
type: string
example: "+4917159374368"
role:
type: string
example: admin
pattern: '^[-.~a-zA-Z0-9_]+$'
maxLength: 64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment