Skip to content

Instantly share code, notes, and snippets.

@dunithd
Created March 2, 2021 02:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dunithd/c939728f1aa51d5ac82b0539942e3ffb to your computer and use it in GitHub Desktop.
Save dunithd/c939728f1aa51d5ac82b0539942e3ffb to your computer and use it in GitHub Desktop.
asyncapi: 2.0.0
info:
title: Account Service
version: '1.0.0'
description: |
This service is responsible for managing user accounts in the system.
license:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0
servers:
production:
url: mqtt://test.mosquitto.org
protocol: mqtt
description: Test MQTT broker
channels:
user/signedup:
subscribe:
operationId: emitUserSignUpEvent
message:
$ref : '#/components/messages/UserSignedUp'
components:
messages:
UserSignedUp:
name: userSignedUp
title: User signed up event
summary: Inform about a new user registration in the system
contentType: application/json
payload:
$ref: '#/components/schemas/userSignedUpPayload'
schemas:
userSignedUpPayload:
type: object
properties:
firstName:
type: string
description: "foo"
lastName:
type: string
description: "bar"
email:
type: string
format: email
description: "baz"
createdAt:
type: string
format: date-time
@peraxelson
Copy link

A bit late to the party i guess but reading the blogpost https://www.asyncapi.com/blog/understanding-asyncapis I was assuming that Acccount Service should publish the emitUserSignUpEvent but here it is defined as subscribe. What is the correct direction?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment