-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhello-world2-2.6.yaml
49 lines (49 loc) · 1.31 KB
/
hello-world2-2.6.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Slightly more complicated AsyncAPI with servers, channels, components,
# and schemas
asyncapi: 2.6.0
info:
title: Hello world application
version: 0.1.0
# You can have multiple servers for production, staging, test, etc.
servers:
production:
url: broker.mycompany.com
protocol: amqp
description: This is "My Company" broker.
# Each channel is part of a server. If a channel does not specify a server,
# it's available on all servers.
channels:
hello:
# Publish means a user can publish messages to a channel
# Another option is subscribe
publish:
message:
# Message schema can be referenced
$ref: '#/components/messages/hello-msg'
goodbye:
publish:
message:
$ref: '#/components/messages/goodbye-msg'
components:
messages:
hello-msg:
# Message payload can be inlined for referenced
payload:
type: object
properties:
name:
type: string
sentAt:
$ref: '#/components/schemas/sent-at'
goodbye-msg:
payload:
type: object
properties:
sentAt:
$ref: '#/components/schemas/sent-at'
schemas:
# Schemas can be shared across payloads
sent-at:
type: string
description: The date and time a message was sent.
format: datetime