@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.
Files changed (34) hide show
  1. package/assets/create-glee-app/templates/default/asyncapi.yaml +14 -12
  2. package/assets/create-glee-app/templates/default/package-lock.json +57 -57
  3. package/assets/create-glee-app/templates/default/package.json +1 -1
  4. package/assets/examples/adeo-kafka-request-reply-asyncapi.yml +288 -0
  5. package/assets/examples/anyof-asyncapi.yml +36 -0
  6. package/assets/examples/{application-headers.yml → application-headers-asyncapi.yml} +29 -26
  7. package/assets/examples/{correlation-id.yml → correlation-id-asyncapi.yml} +80 -44
  8. package/assets/examples/examples.json +28 -16
  9. package/assets/examples/gitter-streaming-asyncapi.yml +178 -0
  10. package/assets/examples/kraken-websocket-request-reply-message-filter-in-reply-asyncapi.yml +388 -0
  11. package/assets/examples/kraken-websocket-request-reply-multiple-channels-asyncapi.yml +394 -0
  12. package/assets/examples/mercure-asyncapi.yml +58 -0
  13. package/assets/examples/not-asyncapi.yml +29 -0
  14. package/assets/examples/oneof-asyncapi.yml +57 -0
  15. package/assets/examples/{operation-security.yml → operation-security-asyncapi.yml} +32 -21
  16. package/assets/examples/{rpc-client.yml → rpc-client-asyncapi.yml} +41 -38
  17. package/assets/examples/{rpc-server.yml → rpc-server-asyncapi.yml} +38 -35
  18. package/assets/examples/{simple.yml → simple-asyncapi.yml} +13 -5
  19. package/assets/examples/{slack-rtm.yml → slack-rtm-asyncapi.yml} +207 -109
  20. package/assets/examples/streetlights-kafka-asyncapi.yml +199 -0
  21. package/assets/examples/streetlights-mqtt-asyncapi.yml +253 -0
  22. package/assets/examples/streetlights-operation-security-asyncapi.yml +240 -0
  23. package/assets/examples/websocket-gemini-asyncapi.yml +301 -0
  24. package/oclif.manifest.json +3 -3
  25. package/package.json +4 -4
  26. package/assets/examples/anyof.yml +0 -31
  27. package/assets/examples/gitter-streaming.yml +0 -168
  28. package/assets/examples/mercure.yml +0 -49
  29. package/assets/examples/not.yml +0 -24
  30. package/assets/examples/oneof.yml +0 -46
  31. package/assets/examples/streetlights-kafka.yml +0 -188
  32. package/assets/examples/streetlights-mqtt.yml +0 -216
  33. package/assets/examples/streetlights-operation-security.yml +0 -212
  34. package/assets/examples/websocket-gemini.yml +0 -209
@@ -1,209 +0,0 @@
1
- #
2
- #
3
- #
4
- # This example showcases usage of AsyncAPI for the purpose of describing a WebSocket API. It is based on a real public service maintained by company called Gemini that provides cryptocurency trading products. It uses AsyncAPI bindings.
5
- #
6
- # This AsyncAPI document describes their v1 of the API. The v2 is also available and changes in the way that it provides a multimessage channel, where you subscribe for messages by sending a subscription message instead of using query parameters. For example with multimessage channel check out this article https://www.asyncapi.com/blog/websocket-part2 about another real public API called Kraken
7
- #
8
- # All available learning materials about AsyncAPI and WebSocket are:
9
- # - WebSocket, Shrek, and AsyncAPI - An Opinionated Intro article: https://www.asyncapi.com/blog/websocket-part1
10
- # - Creating AsyncAPI for WebSocket API - Step by Step article: https://www.asyncapi.com/blog/websocket-part2
11
- # - From API-First to Code Generation - A WebSocket Use Case article: https://www.asyncapi.com/blog/websocket-part3
12
- # - Live stream about topics mentioned in part 1 and 2 articles: https://www.youtube.com/watch?v=8tFBcf31e_c
13
- #
14
-
15
- asyncapi: '2.6.0'
16
-
17
- #
18
- # Overal information for users of the application
19
- #
20
- info:
21
- title: Gemini Market Data Websocket API
22
- version: '1.0.0'
23
- contact:
24
- name: Gemini
25
- url: https://www.gemini.com/
26
- description: |
27
- Market data is a public API that streams all the market data on a given symbol.
28
-
29
- You can quickly play with the API using [websocat](https://github.com/vi/websocat#installation) like this:
30
- ```bash
31
- websocat wss://api.gemini.com/v1/marketdata/btcusd?heartbeat=true -S
32
- ```
33
-
34
- #
35
- # Link to external docs
36
- #
37
- externalDocs:
38
- url: https://docs.sandbox.gemini.com/websocket-api/#market-data
39
-
40
- #
41
- # Details on how to connect to the application
42
- #
43
- servers:
44
- public:
45
- url: wss://api.gemini.com
46
- protocol: wss
47
-
48
- #
49
- # Details about all the channels that you can listen to or send to messages
50
- #
51
- channels:
52
- /v1/marketdata/{symbol}:
53
- parameters:
54
- symbol:
55
- description: |
56
- Symbols are formatted as CCY1CCY2 where prices are in CCY2 and quantities are in CCY1. To read more click [here](https://docs.sandbox.gemini.com/websocket-api/#symbols-and-minimums).
57
- schema:
58
- type: string
59
- enum: ['btcusd', 'ethbtc', 'ethusd', 'zecusd', 'zecbtc', 'zeceth', 'zecbch', 'zecltc', 'bchusd', 'bchbtc', 'bcheth', 'ltcusd', 'ltcbtc', 'ltceth', 'ltcbch', 'batusd', 'daiusd', 'linkusd', 'oxtusd', 'batbtc', 'linkbtc', 'oxtbtc', 'bateth', 'linketh', 'oxteth', 'ampusd', 'compusd', 'paxgusd', 'mkrusd', 'zrxusd', 'kncusd', 'manausd', 'storjusd', 'snxusd', 'crvusd', 'balusd', 'uniusd', 'renusd', 'umausd', 'yfiusd', 'btcdai', 'ethdai', 'aaveusd', 'filusd', 'btceur', 'btcgbp', 'etheur', 'ethgbp', 'btcsgd', 'ethsgd', 'sklusd', 'grtusd', 'bntusd', '1inchusd', 'enjusd', 'lrcusd', 'sandusd', 'cubeusd', 'lptusd', 'bondusd', 'maticusd', 'injusd', 'sushiusd']
60
- bindings:
61
- ws:
62
- bindingVersion: 0.1.0
63
- query:
64
- type: object
65
- description: |
66
- The semantics of entry type filtering is:
67
-
68
- If any entry type is specified as true or false, all of them must be explicitly flagged true to show up in the response
69
- If no entry types filtering parameters are included in the url, then all entry types will appear in the response
70
-
71
- NOTE: top_of_book has no meaning and initial book events are empty when only trades is specified
72
- properties:
73
- heartbeat:
74
- type: boolean
75
- default: false
76
- description: Optionally add this parameter and set to true to receive a heartbeat every 5 seconds
77
- top_of_book:
78
- type: boolean
79
- default: false
80
- description: If absent or false, receive full order book depth; if present and true, receive top of book only. Only applies to bids and offers.
81
- bids:
82
- type: boolean
83
- default: true
84
- description: Include bids in change events
85
- offers:
86
- type: boolean
87
- default: true
88
- description: Include asks in change events
89
- trades:
90
- type: boolean
91
- default: true
92
- description: Include trade events
93
- auctions:
94
- type: boolean
95
- default: true
96
- description: Include auction events
97
- subscribe:
98
- summary: Receive market updates on a given symbol
99
- message:
100
- $ref: '#/components/messages/marketData'
101
-
102
- #
103
- # All reusable parts for readability and staying DRY
104
- #
105
- components:
106
- messages:
107
- marketData:
108
- summary: Message with marked data information.
109
- description: |
110
- The initial response message will show the existing state of the order book. Subsequent messages will show all executed trades, as well as all other changes to the order book from orders placed or canceled.
111
- payload:
112
- $ref: '#/components/schemas/market'
113
- examples:
114
- - name: updateMessage
115
- summary: Example of an update message that contains a change in price information.
116
- payload:
117
- type: update
118
- eventId: 36902233362
119
- timestamp: 1619769673
120
- timestampms: 1619769673527
121
- socket_sequence: 661
122
- events:
123
- - type: change
124
- side: bid
125
- price: 54350.40
126
- remaining: 0.002
127
- delta: 0.002
128
- reason: place
129
- - name: heartbeatMessage
130
- summary: Example of additional heartbeat message when you enable them.
131
- payload:
132
- type: heartbeat
133
- socket_sequence: 1656
134
- schemas:
135
- market:
136
- type: object
137
- oneOf:
138
- - $ref: '#/components/schemas/heartbeat'
139
- - $ref: '#/components/schemas/update'
140
- heartbeat:
141
- allOf:
142
- - properties:
143
- type:
144
- type: string
145
- const: heartbeat
146
- required:
147
- - type
148
- - $ref: '#/components/schemas/default'
149
- update:
150
- allOf:
151
- - properties:
152
- type:
153
- type: string
154
- const: update
155
- eventId:
156
- type: integer
157
- description: A monotonically increasing sequence number indicating when this change occurred. These numbers are persistent and consistent between market data connections.
158
- events:
159
- $ref: '#/components/schemas/events'
160
- timestamp:
161
- type: number
162
- description: The timestamp in seconds for this group of events (included for compatibility reasons). We recommend using the timestampms field instead.
163
- timestampms:
164
- type: number
165
- description: The timestamp in milliseconds for this group of events.
166
- required:
167
- - type
168
- - eventId
169
- - events
170
- - timestamp
171
- - timestampms
172
- - $ref: '#/components/schemas/default'
173
- default:
174
- type: object
175
- description: This object is always part of the payload. In case of type=heartbeat, these are the only fields.
176
- required:
177
- - type
178
- - socket_sequence
179
- properties:
180
- socket_sequence:
181
- type: integer
182
- description: zero-indexed monotonic increasing sequence number attached to each message sent - if there is a gap in this sequence, you have missed a message. If you choose to enable heartbeats, then heartbeat and update messages will share a single increasing sequence. See [Sequence Numbers](https://docs.sandbox.gemini.com/websocket-api/#sequence-numbers) for more information.
183
- events:
184
- type: array
185
- description: Either a change to the order book, or the indication that a trade has occurred.
186
- items:
187
- type: object
188
- additionalProperties: false
189
- properties:
190
- type:
191
- type: string
192
- enum: ['trade', 'change', 'auction, block_trade']
193
- price:
194
- type: number
195
- multipleOf: 0.01
196
- description: The price of this order book entry.
197
- side:
198
- type: string
199
- enum: ['bid', 'side']
200
- reason:
201
- type: string
202
- enum: ['place', 'trade', 'cancel', 'initial']
203
- description: Indicates why the change has occurred. initial is for the initial response message, which will show the entire existing state of the order book.
204
- remaining:
205
- type: number
206
- description: The quantity remaining at that price level after this change occurred. May be zero if all orders at this price level have been filled or canceled.
207
- delta:
208
- type: number
209
- description: The quantity changed. May be negative, if an order is filled or canceled. For initial messages, delta will equal remaining.