@asyncapi/cli 1.2.10 → 1.2.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/create-glee-app/templates/default/asyncapi.yaml +14 -12
- package/assets/create-glee-app/templates/default/package-lock.json +57 -57
- package/assets/create-glee-app/templates/default/package.json +1 -1
- package/assets/examples/adeo-kafka-request-reply-asyncapi.yml +288 -0
- package/assets/examples/anyof-asyncapi.yml +36 -0
- package/assets/examples/{application-headers.yml → application-headers-asyncapi.yml} +29 -26
- package/assets/examples/{correlation-id.yml → correlation-id-asyncapi.yml} +80 -44
- package/assets/examples/examples.json +28 -16
- package/assets/examples/gitter-streaming-asyncapi.yml +178 -0
- package/assets/examples/kraken-websocket-request-reply-message-filter-in-reply-asyncapi.yml +388 -0
- package/assets/examples/kraken-websocket-request-reply-multiple-channels-asyncapi.yml +394 -0
- package/assets/examples/mercure-asyncapi.yml +58 -0
- package/assets/examples/not-asyncapi.yml +29 -0
- package/assets/examples/oneof-asyncapi.yml +57 -0
- package/assets/examples/{operation-security.yml → operation-security-asyncapi.yml} +32 -21
- package/assets/examples/{rpc-client.yml → rpc-client-asyncapi.yml} +41 -38
- package/assets/examples/{rpc-server.yml → rpc-server-asyncapi.yml} +38 -35
- package/assets/examples/{simple.yml → simple-asyncapi.yml} +13 -5
- package/assets/examples/{slack-rtm.yml → slack-rtm-asyncapi.yml} +207 -109
- package/assets/examples/streetlights-kafka-asyncapi.yml +199 -0
- package/assets/examples/streetlights-mqtt-asyncapi.yml +253 -0
- package/assets/examples/streetlights-operation-security-asyncapi.yml +240 -0
- package/assets/examples/websocket-gemini-asyncapi.yml +301 -0
- package/oclif.manifest.json +3 -3
- package/package.json +4 -4
- package/assets/examples/anyof.yml +0 -31
- package/assets/examples/gitter-streaming.yml +0 -168
- package/assets/examples/mercure.yml +0 -49
- package/assets/examples/not.yml +0 -24
- package/assets/examples/oneof.yml +0 -46
- package/assets/examples/streetlights-kafka.yml +0 -188
- package/assets/examples/streetlights-mqtt.yml +0 -216
- package/assets/examples/streetlights-operation-security.yml +0 -212
- package/assets/examples/websocket-gemini.yml +0 -209
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
asyncapi: 3.0.0
|
|
2
|
+
info:
|
|
3
|
+
title: Gemini Market Data Websocket API
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
description: >
|
|
6
|
+
Market data is a public API that streams all the market data on a given
|
|
7
|
+
symbol.
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
You can quickly play with the API using
|
|
11
|
+
[websocat](https://github.com/vi/websocat#installation) like this:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
|
|
15
|
+
websocat wss://api.gemini.com/v1/marketdata/btcusd?heartbeat=true -S
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
contact:
|
|
19
|
+
name: Gemini
|
|
20
|
+
url: 'https://www.gemini.com/'
|
|
21
|
+
externalDocs:
|
|
22
|
+
url: 'https://docs.sandbox.gemini.com/websocket-api/#market-data'
|
|
23
|
+
servers:
|
|
24
|
+
public:
|
|
25
|
+
host: api.gemini.com
|
|
26
|
+
protocol: wss
|
|
27
|
+
channels:
|
|
28
|
+
marketDataV1:
|
|
29
|
+
address: '/v1/marketdata/{symbol}'
|
|
30
|
+
messages:
|
|
31
|
+
marketData:
|
|
32
|
+
$ref: '#/components/messages/marketData'
|
|
33
|
+
parameters:
|
|
34
|
+
symbol:
|
|
35
|
+
enum:
|
|
36
|
+
- btcusd
|
|
37
|
+
- ethbtc
|
|
38
|
+
- ethusd
|
|
39
|
+
- zecusd
|
|
40
|
+
- zecbtc
|
|
41
|
+
- zeceth
|
|
42
|
+
- zecbch
|
|
43
|
+
- zecltc
|
|
44
|
+
- bchusd
|
|
45
|
+
- bchbtc
|
|
46
|
+
- bcheth
|
|
47
|
+
- ltcusd
|
|
48
|
+
- ltcbtc
|
|
49
|
+
- ltceth
|
|
50
|
+
- ltcbch
|
|
51
|
+
- batusd
|
|
52
|
+
- daiusd
|
|
53
|
+
- linkusd
|
|
54
|
+
- oxtusd
|
|
55
|
+
- batbtc
|
|
56
|
+
- linkbtc
|
|
57
|
+
- oxtbtc
|
|
58
|
+
- bateth
|
|
59
|
+
- linketh
|
|
60
|
+
- oxteth
|
|
61
|
+
- ampusd
|
|
62
|
+
- compusd
|
|
63
|
+
- paxgusd
|
|
64
|
+
- mkrusd
|
|
65
|
+
- zrxusd
|
|
66
|
+
- kncusd
|
|
67
|
+
- manausd
|
|
68
|
+
- storjusd
|
|
69
|
+
- snxusd
|
|
70
|
+
- crvusd
|
|
71
|
+
- balusd
|
|
72
|
+
- uniusd
|
|
73
|
+
- renusd
|
|
74
|
+
- umausd
|
|
75
|
+
- yfiusd
|
|
76
|
+
- btcdai
|
|
77
|
+
- ethdai
|
|
78
|
+
- aaveusd
|
|
79
|
+
- filusd
|
|
80
|
+
- btceur
|
|
81
|
+
- btcgbp
|
|
82
|
+
- etheur
|
|
83
|
+
- ethgbp
|
|
84
|
+
- btcsgd
|
|
85
|
+
- ethsgd
|
|
86
|
+
- sklusd
|
|
87
|
+
- grtusd
|
|
88
|
+
- bntusd
|
|
89
|
+
- 1inchusd
|
|
90
|
+
- enjusd
|
|
91
|
+
- lrcusd
|
|
92
|
+
- sandusd
|
|
93
|
+
- cubeusd
|
|
94
|
+
- lptusd
|
|
95
|
+
- bondusd
|
|
96
|
+
- maticusd
|
|
97
|
+
- injusd
|
|
98
|
+
- sushiusd
|
|
99
|
+
description: >
|
|
100
|
+
Symbols are formatted as CCY1CCY2 where prices are in CCY2 and
|
|
101
|
+
quantities are in CCY1. To read more click
|
|
102
|
+
[here](https://docs.sandbox.gemini.com/websocket-api/#symbols-and-minimums).
|
|
103
|
+
bindings:
|
|
104
|
+
ws:
|
|
105
|
+
bindingVersion: 0.1.0
|
|
106
|
+
query:
|
|
107
|
+
type: object
|
|
108
|
+
description: >
|
|
109
|
+
The semantics of entry type filtering is:
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
If any entry type is specified as true or false, all of them must be
|
|
113
|
+
explicitly flagged true to show up in the response
|
|
114
|
+
|
|
115
|
+
If no entry types filtering parameters are included in the url, then
|
|
116
|
+
all entry types will appear in the response
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
NOTE: top_of_book has no meaning and initial book events are empty
|
|
120
|
+
when only trades is specified
|
|
121
|
+
properties:
|
|
122
|
+
heartbeat:
|
|
123
|
+
type: boolean
|
|
124
|
+
default: false
|
|
125
|
+
description: >-
|
|
126
|
+
Optionally add this parameter and set to true to receive a
|
|
127
|
+
heartbeat every 5 seconds
|
|
128
|
+
top_of_book:
|
|
129
|
+
type: boolean
|
|
130
|
+
default: false
|
|
131
|
+
description: >-
|
|
132
|
+
If absent or false, receive full order book depth; if present
|
|
133
|
+
and true, receive top of book only. Only applies to bids and
|
|
134
|
+
offers.
|
|
135
|
+
bids:
|
|
136
|
+
type: boolean
|
|
137
|
+
default: true
|
|
138
|
+
description: Include bids in change events
|
|
139
|
+
offers:
|
|
140
|
+
type: boolean
|
|
141
|
+
default: true
|
|
142
|
+
description: Include asks in change events
|
|
143
|
+
trades:
|
|
144
|
+
type: boolean
|
|
145
|
+
default: true
|
|
146
|
+
description: Include trade events
|
|
147
|
+
auctions:
|
|
148
|
+
type: boolean
|
|
149
|
+
default: true
|
|
150
|
+
description: Include auction events
|
|
151
|
+
operations:
|
|
152
|
+
sendMarketData:
|
|
153
|
+
action: send
|
|
154
|
+
channel:
|
|
155
|
+
$ref: '#/channels/marketDataV1'
|
|
156
|
+
summary: Receive market updates on a given symbol
|
|
157
|
+
messages:
|
|
158
|
+
- $ref: '#/channels/marketDataV1/messages/marketData'
|
|
159
|
+
components:
|
|
160
|
+
messages:
|
|
161
|
+
marketData:
|
|
162
|
+
summary: Message with marked data information.
|
|
163
|
+
description: >
|
|
164
|
+
The initial response message will show the existing state of the order
|
|
165
|
+
book. Subsequent messages will show all executed trades, as well as all
|
|
166
|
+
other changes to the order book from orders placed or canceled.
|
|
167
|
+
payload:
|
|
168
|
+
$ref: '#/components/schemas/market'
|
|
169
|
+
examples:
|
|
170
|
+
- name: updateMessage
|
|
171
|
+
summary: >-
|
|
172
|
+
Example of an update message that contains a change in price
|
|
173
|
+
information.
|
|
174
|
+
payload:
|
|
175
|
+
type: update
|
|
176
|
+
eventId: 36902233362
|
|
177
|
+
timestamp: 1619769673
|
|
178
|
+
timestampms: 1619769673527
|
|
179
|
+
socket_sequence: 661
|
|
180
|
+
events:
|
|
181
|
+
- type: change
|
|
182
|
+
side: bid
|
|
183
|
+
price: 54350.40
|
|
184
|
+
remaining: 0.002
|
|
185
|
+
delta: 0.002
|
|
186
|
+
reason: place
|
|
187
|
+
- name: heartbeatMessage
|
|
188
|
+
summary: Example of additional heartbeat message when you enable them.
|
|
189
|
+
payload:
|
|
190
|
+
type: heartbeat
|
|
191
|
+
socket_sequence: 1656
|
|
192
|
+
schemas:
|
|
193
|
+
market:
|
|
194
|
+
type: object
|
|
195
|
+
oneOf:
|
|
196
|
+
- $ref: '#/components/schemas/heartbeat'
|
|
197
|
+
- $ref: '#/components/schemas/update'
|
|
198
|
+
heartbeat:
|
|
199
|
+
allOf:
|
|
200
|
+
- properties:
|
|
201
|
+
type:
|
|
202
|
+
type: string
|
|
203
|
+
const: heartbeat
|
|
204
|
+
required:
|
|
205
|
+
- type
|
|
206
|
+
- $ref: '#/components/schemas/default'
|
|
207
|
+
update:
|
|
208
|
+
allOf:
|
|
209
|
+
- properties:
|
|
210
|
+
type:
|
|
211
|
+
type: string
|
|
212
|
+
const: update
|
|
213
|
+
eventId:
|
|
214
|
+
type: integer
|
|
215
|
+
description: >-
|
|
216
|
+
A monotonically increasing sequence number indicating when this
|
|
217
|
+
change occurred. These numbers are persistent and consistent
|
|
218
|
+
between market data connections.
|
|
219
|
+
events:
|
|
220
|
+
$ref: '#/components/schemas/events'
|
|
221
|
+
timestamp:
|
|
222
|
+
type: number
|
|
223
|
+
description: >-
|
|
224
|
+
The timestamp in seconds for this group of events (included for
|
|
225
|
+
compatibility reasons). We recommend using the timestampms field
|
|
226
|
+
instead.
|
|
227
|
+
timestampms:
|
|
228
|
+
type: number
|
|
229
|
+
description: The timestamp in milliseconds for this group of events.
|
|
230
|
+
required:
|
|
231
|
+
- type
|
|
232
|
+
- eventId
|
|
233
|
+
- events
|
|
234
|
+
- timestamp
|
|
235
|
+
- timestampms
|
|
236
|
+
- $ref: '#/components/schemas/default'
|
|
237
|
+
default:
|
|
238
|
+
type: object
|
|
239
|
+
description: >-
|
|
240
|
+
This object is always part of the payload. In case of type=heartbeat,
|
|
241
|
+
these are the only fields.
|
|
242
|
+
required:
|
|
243
|
+
- type
|
|
244
|
+
- socket_sequence
|
|
245
|
+
properties:
|
|
246
|
+
socket_sequence:
|
|
247
|
+
type: integer
|
|
248
|
+
description: >-
|
|
249
|
+
zero-indexed monotonic increasing sequence number attached to each
|
|
250
|
+
message sent - if there is a gap in this sequence, you have missed a
|
|
251
|
+
message. If you choose to enable heartbeats, then heartbeat and
|
|
252
|
+
update messages will share a single increasing sequence. See
|
|
253
|
+
[Sequence
|
|
254
|
+
Numbers](https://docs.sandbox.gemini.com/websocket-api/#sequence-numbers)
|
|
255
|
+
for more information.
|
|
256
|
+
events:
|
|
257
|
+
type: array
|
|
258
|
+
description: >-
|
|
259
|
+
Either a change to the order book, or the indication that a trade has
|
|
260
|
+
occurred.
|
|
261
|
+
items:
|
|
262
|
+
type: object
|
|
263
|
+
additionalProperties: false
|
|
264
|
+
properties:
|
|
265
|
+
type:
|
|
266
|
+
type: string
|
|
267
|
+
enum:
|
|
268
|
+
- trade
|
|
269
|
+
- change
|
|
270
|
+
- 'auction, block_trade'
|
|
271
|
+
price:
|
|
272
|
+
type: number
|
|
273
|
+
multipleOf: 0.01
|
|
274
|
+
description: The price of this order book entry.
|
|
275
|
+
side:
|
|
276
|
+
type: string
|
|
277
|
+
enum:
|
|
278
|
+
- bid
|
|
279
|
+
- side
|
|
280
|
+
reason:
|
|
281
|
+
type: string
|
|
282
|
+
enum:
|
|
283
|
+
- place
|
|
284
|
+
- trade
|
|
285
|
+
- cancel
|
|
286
|
+
- initial
|
|
287
|
+
description: >-
|
|
288
|
+
Indicates why the change has occurred. initial is for the initial
|
|
289
|
+
response message, which will show the entire existing state of the
|
|
290
|
+
order book.
|
|
291
|
+
remaining:
|
|
292
|
+
type: number
|
|
293
|
+
description: >-
|
|
294
|
+
The quantity remaining at that price level after this change
|
|
295
|
+
occurred. May be zero if all orders at this price level have been
|
|
296
|
+
filled or canceled.
|
|
297
|
+
delta:
|
|
298
|
+
type: number
|
|
299
|
+
description: >-
|
|
300
|
+
The quantity changed. May be negative, if an order is filled or
|
|
301
|
+
canceled. For initial messages, delta will equal remaining.
|
package/oclif.manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.2.
|
|
2
|
+
"version": "1.2.13",
|
|
3
3
|
"commands": {
|
|
4
4
|
"bundle": {
|
|
5
5
|
"id": "bundle",
|
|
@@ -739,7 +739,7 @@
|
|
|
739
739
|
"name": "example",
|
|
740
740
|
"type": "option",
|
|
741
741
|
"char": "e",
|
|
742
|
-
"description": "name of the example to use. Available examples are:\n\t - simple.yml\n\t - anyof.yml\n\t - application-headers.yml\n\t - correlation-id.yml\n\t - websocket-gemini.yml\n\t - gitter-streaming.yml\n\t - mercure.yml\n\t - not.yml\n\t - operation-security.yml\n\t - oneof.yml\n\t - rpc-client.yml\n\t - rpc-server.yml\n\t - slack-rtm.yml\n\t - tutorial.yml\n\t - streetlights-kafka.yml\n\t - streetlights-operation-security.yml\n\t - streetlights-mqtt.yml",
|
|
742
|
+
"description": "name of the example to use. Available examples are:\n\t - simple-asyncapi.yml\n\t - adeo-kafka-request-reply-asyncapi.yml\n\t - anyof-asyncapi.yml\n\t - application-headers-asyncapi.yml\n\t - correlation-id-asyncapi.yml\n\t - websocket-gemini-asyncapi.yml\n\t - gitter-streaming-asyncapi.yml\n\t - kraken-websocket-request-reply-message-filter-in-reply-asyncapi.yml\n\t - kraken-websocket-request-reply-multiple-channels-asyncapi.yml\n\t - mercure-asyncapi.yml\n\t - not-asyncapi.yml\n\t - operation-security-asyncapi.yml\n\t - oneof-asyncapi.yml\n\t - rpc-client-asyncapi.yml\n\t - rpc-server-asyncapi.yml\n\t - slack-rtm-asyncapi.yml\n\t - tutorial.yml\n\t - streetlights-kafka-asyncapi.yml\n\t - streetlights-operation-security-asyncapi.yml\n\t - streetlights-mqtt-asyncapi.yml",
|
|
743
743
|
"multiple": false
|
|
744
744
|
},
|
|
745
745
|
"studio": {
|
|
@@ -831,7 +831,7 @@
|
|
|
831
831
|
"name": "example",
|
|
832
832
|
"type": "option",
|
|
833
833
|
"char": "e",
|
|
834
|
-
"description": "name of the example to use. Available examples are:\n\t - simple.yml\n\t - anyof.yml\n\t - application-headers.yml\n\t - correlation-id.yml\n\t - websocket-gemini.yml\n\t - gitter-streaming.yml\n\t - mercure.yml\n\t - not.yml\n\t - operation-security.yml\n\t - oneof.yml\n\t - rpc-client.yml\n\t - rpc-server.yml\n\t - slack-rtm.yml\n\t - tutorial.yml\n\t - streetlights-kafka.yml\n\t - streetlights-operation-security.yml\n\t - streetlights-mqtt.yml",
|
|
834
|
+
"description": "name of the example to use. Available examples are:\n\t - simple-asyncapi.yml\n\t - adeo-kafka-request-reply-asyncapi.yml\n\t - anyof-asyncapi.yml\n\t - application-headers-asyncapi.yml\n\t - correlation-id-asyncapi.yml\n\t - websocket-gemini-asyncapi.yml\n\t - gitter-streaming-asyncapi.yml\n\t - kraken-websocket-request-reply-message-filter-in-reply-asyncapi.yml\n\t - kraken-websocket-request-reply-multiple-channels-asyncapi.yml\n\t - mercure-asyncapi.yml\n\t - not-asyncapi.yml\n\t - operation-security-asyncapi.yml\n\t - oneof-asyncapi.yml\n\t - rpc-client-asyncapi.yml\n\t - rpc-server-asyncapi.yml\n\t - slack-rtm-asyncapi.yml\n\t - tutorial.yml\n\t - streetlights-kafka-asyncapi.yml\n\t - streetlights-operation-security-asyncapi.yml\n\t - streetlights-mqtt-asyncapi.yml",
|
|
835
835
|
"multiple": false
|
|
836
836
|
},
|
|
837
837
|
"studio": {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@asyncapi/cli",
|
|
3
3
|
"description": "All in one CLI for all AsyncAPI tools",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.13",
|
|
5
5
|
"author": "@asyncapi",
|
|
6
6
|
"bin": {
|
|
7
7
|
"asyncapi": "./bin/run"
|
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
"bugs": "https://github.com/asyncapi/cli/issues",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@asyncapi/avro-schema-parser": "^3.0.7",
|
|
12
|
-
"@asyncapi/bundler": "^0.
|
|
12
|
+
"@asyncapi/bundler": "^0.4.0",
|
|
13
13
|
"@asyncapi/converter": "^1.4.5",
|
|
14
14
|
"@asyncapi/diff": "^0.4.1",
|
|
15
15
|
"@asyncapi/generator": "^1.15.5",
|
|
16
|
-
"@asyncapi/modelina": "^2.0.
|
|
16
|
+
"@asyncapi/modelina": "^2.0.9",
|
|
17
17
|
"@asyncapi/openapi-schema-parser": "^3.0.5",
|
|
18
|
-
"@asyncapi/optimizer": "^0.2.
|
|
18
|
+
"@asyncapi/optimizer": "^0.2.5",
|
|
19
19
|
"@asyncapi/parser": "^3.0.1",
|
|
20
20
|
"@asyncapi/protobuf-schema-parser": "^3.0.4",
|
|
21
21
|
"@asyncapi/raml-dt-schema-parser": "^4.0.6",
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
asyncapi: '2.6.0'
|
|
2
|
-
info:
|
|
3
|
-
title: AnyOf example
|
|
4
|
-
version: '1.0.0'
|
|
5
|
-
|
|
6
|
-
channels:
|
|
7
|
-
test:
|
|
8
|
-
publish:
|
|
9
|
-
message:
|
|
10
|
-
$ref: '#/components/messages/testMessages'
|
|
11
|
-
|
|
12
|
-
components:
|
|
13
|
-
messages:
|
|
14
|
-
testMessages:
|
|
15
|
-
payload:
|
|
16
|
-
anyOf: # anyOf in payload schema
|
|
17
|
-
- $ref: "#/components/schemas/objectWithKey"
|
|
18
|
-
- $ref: "#/components/schemas/objectWithKey2"
|
|
19
|
-
|
|
20
|
-
schemas:
|
|
21
|
-
objectWithKey:
|
|
22
|
-
type: object
|
|
23
|
-
properties:
|
|
24
|
-
key:
|
|
25
|
-
type: string
|
|
26
|
-
additionalProperties: false
|
|
27
|
-
objectWithKey2:
|
|
28
|
-
type: object
|
|
29
|
-
properties:
|
|
30
|
-
key2:
|
|
31
|
-
type: string
|
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
asyncapi: '2.6.0'
|
|
2
|
-
id: 'tag:stream.gitter.im,2022:api'
|
|
3
|
-
info:
|
|
4
|
-
title: Gitter Streaming API
|
|
5
|
-
version: '1.0.0'
|
|
6
|
-
|
|
7
|
-
servers:
|
|
8
|
-
production:
|
|
9
|
-
url: https://stream.gitter.im/v1
|
|
10
|
-
protocol: https
|
|
11
|
-
protocolVersion: '1.1'
|
|
12
|
-
security:
|
|
13
|
-
- httpBearerToken: []
|
|
14
|
-
|
|
15
|
-
channels:
|
|
16
|
-
/rooms/{roomId}/{resource}:
|
|
17
|
-
parameters:
|
|
18
|
-
roomId:
|
|
19
|
-
description: Id of the Gitter room.
|
|
20
|
-
schema:
|
|
21
|
-
type: string
|
|
22
|
-
examples:
|
|
23
|
-
- 53307860c3599d1de448e19d
|
|
24
|
-
resource:
|
|
25
|
-
description: The resource to consume.
|
|
26
|
-
schema:
|
|
27
|
-
type: string
|
|
28
|
-
enum:
|
|
29
|
-
- chatMessages
|
|
30
|
-
- events
|
|
31
|
-
subscribe:
|
|
32
|
-
bindings:
|
|
33
|
-
http:
|
|
34
|
-
type: response
|
|
35
|
-
message:
|
|
36
|
-
oneOf:
|
|
37
|
-
- $ref: '#/components/messages/chatMessage'
|
|
38
|
-
- $ref: '#/components/messages/heartbeat'
|
|
39
|
-
|
|
40
|
-
components:
|
|
41
|
-
securitySchemes:
|
|
42
|
-
httpBearerToken:
|
|
43
|
-
type: http
|
|
44
|
-
scheme: bearer
|
|
45
|
-
messages:
|
|
46
|
-
chatMessage:
|
|
47
|
-
schemaFormat: 'application/schema+yaml;version=draft-07'
|
|
48
|
-
summary: >-
|
|
49
|
-
A message represents an individual chat message sent to a room.
|
|
50
|
-
They are a sub-resource of a room.
|
|
51
|
-
payload:
|
|
52
|
-
type: object
|
|
53
|
-
properties:
|
|
54
|
-
id:
|
|
55
|
-
type: string
|
|
56
|
-
description: ID of the message.
|
|
57
|
-
text:
|
|
58
|
-
type: string
|
|
59
|
-
description: Original message in plain-text/markdown.
|
|
60
|
-
html:
|
|
61
|
-
type: string
|
|
62
|
-
description: HTML formatted message.
|
|
63
|
-
sent:
|
|
64
|
-
type: string
|
|
65
|
-
format: date-time
|
|
66
|
-
description: ISO formatted date of the message.
|
|
67
|
-
fromUser:
|
|
68
|
-
type: object
|
|
69
|
-
description: User that sent the message.
|
|
70
|
-
properties:
|
|
71
|
-
id:
|
|
72
|
-
type: string
|
|
73
|
-
description: Gitter User ID.
|
|
74
|
-
username:
|
|
75
|
-
type: string
|
|
76
|
-
description: Gitter/GitHub username.
|
|
77
|
-
displayName:
|
|
78
|
-
type: string
|
|
79
|
-
description: Gitter/GitHub user real name.
|
|
80
|
-
url:
|
|
81
|
-
type: string
|
|
82
|
-
description: Path to the user on Gitter.
|
|
83
|
-
avatarUrl:
|
|
84
|
-
type: string
|
|
85
|
-
format: uri
|
|
86
|
-
description: User avatar URI.
|
|
87
|
-
avatarUrlSmall:
|
|
88
|
-
type: string
|
|
89
|
-
format: uri
|
|
90
|
-
description: User avatar URI (small).
|
|
91
|
-
avatarUrlMedium:
|
|
92
|
-
type: string
|
|
93
|
-
format: uri
|
|
94
|
-
description: User avatar URI (medium).
|
|
95
|
-
v:
|
|
96
|
-
type: number
|
|
97
|
-
description: Version.
|
|
98
|
-
gv:
|
|
99
|
-
type: string
|
|
100
|
-
description: Stands for "Gravatar version" and is used for cache busting.
|
|
101
|
-
unread:
|
|
102
|
-
type: boolean
|
|
103
|
-
description: Boolean that indicates if the current user has read the message.
|
|
104
|
-
readBy:
|
|
105
|
-
type: number
|
|
106
|
-
description: Number of users that have read the message.
|
|
107
|
-
urls:
|
|
108
|
-
type: array
|
|
109
|
-
description: List of URLs present in the message.
|
|
110
|
-
items:
|
|
111
|
-
type: string
|
|
112
|
-
format: uri
|
|
113
|
-
mentions:
|
|
114
|
-
type: array
|
|
115
|
-
description: List of @Mentions in the message.
|
|
116
|
-
items:
|
|
117
|
-
type: object
|
|
118
|
-
properties:
|
|
119
|
-
screenName:
|
|
120
|
-
type: string
|
|
121
|
-
userId:
|
|
122
|
-
type: string
|
|
123
|
-
userIds:
|
|
124
|
-
type: array
|
|
125
|
-
items:
|
|
126
|
-
type: string
|
|
127
|
-
issues:
|
|
128
|
-
type: array
|
|
129
|
-
description: 'List of #Issues referenced in the message.'
|
|
130
|
-
items:
|
|
131
|
-
type: object
|
|
132
|
-
properties:
|
|
133
|
-
number:
|
|
134
|
-
type: string
|
|
135
|
-
meta:
|
|
136
|
-
type: array
|
|
137
|
-
description: Metadata. This is currently not used for anything.
|
|
138
|
-
items: {}
|
|
139
|
-
v:
|
|
140
|
-
type: number
|
|
141
|
-
description: Version.
|
|
142
|
-
gv:
|
|
143
|
-
type: string
|
|
144
|
-
description: Stands for "Gravatar version" and is used for cache busting.
|
|
145
|
-
bindings:
|
|
146
|
-
http:
|
|
147
|
-
$ref: '#/components/messageBindings/streamingHeaders'
|
|
148
|
-
|
|
149
|
-
heartbeat:
|
|
150
|
-
schemaFormat: 'application/schema+yaml;version=draft-07'
|
|
151
|
-
summary: Its purpose is to keep the connection alive.
|
|
152
|
-
payload:
|
|
153
|
-
type: string
|
|
154
|
-
enum: ["\r\n"]
|
|
155
|
-
bindings:
|
|
156
|
-
http:
|
|
157
|
-
$ref: '#/components/messageBindings/streamingHeaders'
|
|
158
|
-
|
|
159
|
-
messageBindings:
|
|
160
|
-
streamingHeaders:
|
|
161
|
-
http:
|
|
162
|
-
headers:
|
|
163
|
-
type: object
|
|
164
|
-
properties:
|
|
165
|
-
'Transfer-Encoding':
|
|
166
|
-
const: 'chunked'
|
|
167
|
-
Trailer:
|
|
168
|
-
const: '\r\n'
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
asyncapi: '2.6.0'
|
|
2
|
-
info:
|
|
3
|
-
title: Mercure Hub Example
|
|
4
|
-
version: '1.0.0'
|
|
5
|
-
description: This example demonstrates how to define a Mercure hub.
|
|
6
|
-
|
|
7
|
-
# While not mandatory, it's a best practice to use formats with hypermedia capabilities such as JSON-LD, Atom or HTML with the Mercure protocol
|
|
8
|
-
defaultContentType: application/ld+json
|
|
9
|
-
|
|
10
|
-
servers:
|
|
11
|
-
production:
|
|
12
|
-
url: https://demo.mercure.rocks/.well-known/mercure
|
|
13
|
-
protocol: mercure
|
|
14
|
-
|
|
15
|
-
channels:
|
|
16
|
-
'https://example.com/books/{id}':
|
|
17
|
-
description: Every time a resource of type `http://schema.org/Book` is created or modified, a JSON-LD representation of the new version of this resource must be pushed in this Mercure topic.
|
|
18
|
-
parameters:
|
|
19
|
-
id:
|
|
20
|
-
schema:
|
|
21
|
-
type: integer
|
|
22
|
-
subscribe:
|
|
23
|
-
message:
|
|
24
|
-
$ref: '#/components/messages/book'
|
|
25
|
-
publish:
|
|
26
|
-
message:
|
|
27
|
-
$ref: '#/components/messages/book'
|
|
28
|
-
|
|
29
|
-
components:
|
|
30
|
-
messages:
|
|
31
|
-
book:
|
|
32
|
-
summary: The content of a book resource.
|
|
33
|
-
externalDocs:
|
|
34
|
-
url: https://schema.org/Book
|
|
35
|
-
payload:
|
|
36
|
-
type: object
|
|
37
|
-
properties:
|
|
38
|
-
'@id':
|
|
39
|
-
type: string
|
|
40
|
-
format: iri-reference
|
|
41
|
-
'@type':
|
|
42
|
-
type: string
|
|
43
|
-
format: iri-reference
|
|
44
|
-
name:
|
|
45
|
-
type: string
|
|
46
|
-
isbn:
|
|
47
|
-
type: string
|
|
48
|
-
abstract:
|
|
49
|
-
type: string
|
package/assets/examples/not.yml
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
asyncapi: '2.6.0'
|
|
2
|
-
info:
|
|
3
|
-
title: Not example
|
|
4
|
-
version: '1.0.0'
|
|
5
|
-
|
|
6
|
-
channels:
|
|
7
|
-
test:
|
|
8
|
-
publish:
|
|
9
|
-
message:
|
|
10
|
-
$ref: '#/components/messages/testMessages'
|
|
11
|
-
|
|
12
|
-
components:
|
|
13
|
-
messages:
|
|
14
|
-
testMessages:
|
|
15
|
-
payload:
|
|
16
|
-
$ref: "#/components/schemas/testSchema"
|
|
17
|
-
|
|
18
|
-
schemas:
|
|
19
|
-
testSchema:
|
|
20
|
-
type: object
|
|
21
|
-
properties:
|
|
22
|
-
key:
|
|
23
|
-
not:
|
|
24
|
-
type: integer
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
asyncapi: '2.6.0'
|
|
2
|
-
info:
|
|
3
|
-
title: OneOf example
|
|
4
|
-
version: '1.0.0'
|
|
5
|
-
|
|
6
|
-
channels:
|
|
7
|
-
test:
|
|
8
|
-
publish:
|
|
9
|
-
message:
|
|
10
|
-
$ref: '#/components/messages/testMessages'
|
|
11
|
-
|
|
12
|
-
test2:
|
|
13
|
-
subscribe:
|
|
14
|
-
message:
|
|
15
|
-
# Use oneOf here if different messages are published on test2 topic.
|
|
16
|
-
oneOf:
|
|
17
|
-
- payload:
|
|
18
|
-
$ref: "#/components/schemas/objectWithKey"
|
|
19
|
-
- payload:
|
|
20
|
-
$ref: "#/components/schemas/objectWithKey2"
|
|
21
|
-
|
|
22
|
-
components:
|
|
23
|
-
messages:
|
|
24
|
-
testMessages:
|
|
25
|
-
payload:
|
|
26
|
-
oneOf: # oneOf in payload schema
|
|
27
|
-
- $ref: "#/components/schemas/objectWithKey"
|
|
28
|
-
- $ref: "#/components/schemas/objectWithKey2"
|
|
29
|
-
testMessage1:
|
|
30
|
-
payload:
|
|
31
|
-
$ref: "#/components/schemas/objectWithKey"
|
|
32
|
-
testMessage2:
|
|
33
|
-
payload:
|
|
34
|
-
$ref: "#/components/schemas/objectWithKey2"
|
|
35
|
-
|
|
36
|
-
schemas:
|
|
37
|
-
objectWithKey:
|
|
38
|
-
type: object
|
|
39
|
-
properties:
|
|
40
|
-
key:
|
|
41
|
-
type: string
|
|
42
|
-
objectWithKey2:
|
|
43
|
-
type: object
|
|
44
|
-
properties:
|
|
45
|
-
key2:
|
|
46
|
-
type: string
|