-
Notifications
You must be signed in to change notification settings - Fork 230
Expand file tree
/
Copy pathasyncapi.yaml
More file actions
80 lines (76 loc) · 2.13 KB
/
asyncapi.yaml
File metadata and controls
80 lines (76 loc) · 2.13 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
asyncapi: 3.0.0
info:
title: Test websocket schema
version: 1.0.0
description: This is a test websocket API.
channels:
channelOne:
title: Test channel
description: >-
This is a websocket channel.
It can have _markdown_ in the description.
* Use the "echo-websocket.hoppscotch.io" server to receive timestamped messages every second.
* Use the "echo.websocket.org" server to send test messages to the websocket. This server will echo back any messages you send to it.
address: /
messages:
TestMessage:
$ref: '#/components/messages/TestMessage'
Timestamp:
$ref: '#/components/messages/Timestamp'
servers:
echo-websocket:
host: echo-websocket.hoppscotch.io
protocol: wss
echo:
host: echo.websocket.org
protocol: wss
operations:
sendTestMessage:
action: receive
channel:
$ref: '#/channels/channelOne'
messages:
- $ref: '#/channels/channelOne/messages/TestMessage'
receiveTestMessage:
action: send
channel:
$ref: '#/channels/channelOne'
messages:
- $ref: '#/channels/channelOne/messages/TestMessage'
receiveTimestamp:
action: send
channel:
$ref: '#/channels/channelOne'
messages:
- $ref: '#/channels/channelOne/messages/Timestamp'
components:
messages:
TestMessage:
title: Test message
description: Test message sent to the echo server
payload:
type: object
properties:
text:
type: string
description: The text of your message
subtext:
type: string
description: Optional second message field
from:
type: string
description: The name of the sender
required:
- text
Timestamp:
title: Timestamp
description: Timestamp message sent from echo hoppscotch server
payload:
schema:
$ref: '#/components/schemas/Timestamp'
schemas:
Timestamp:
type: string
description: Timestamp message sent from echo hoppscotch server
examples:
- '22:02:27 GMT+0000 (Coordinated Universal Time)'