@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,188 +0,0 @@
1
- asyncapi: '2.6.0'
2
- info:
3
- title: Streetlights Kafka API
4
- version: '1.0.0'
5
- description: |
6
- The Smartylighting Streetlights API allows you to remotely manage the city lights.
7
-
8
- ### Check out its awesome features:
9
-
10
- * Turn a specific streetlight on/off 🌃
11
- * Dim a specific streetlight 😎
12
- * Receive real-time information about environmental lighting conditions 📈
13
- license:
14
- name: Apache 2.0
15
- url: https://www.apache.org/licenses/LICENSE-2.0
16
-
17
- servers:
18
- scram-connections:
19
- url: test.mykafkacluster.org:18092
20
- protocol: kafka-secure
21
- description: Test broker secured with scramSha256
22
- security:
23
- - saslScram: []
24
- tags:
25
- - name: "env:test-scram"
26
- description: "This environment is meant for running internal tests through scramSha256"
27
- - name: "kind:remote"
28
- description: "This server is a remote server. Not exposed by the application"
29
- - name: "visibility:private"
30
- description: "This resource is private and only available to certain users"
31
- mtls-connections:
32
- url: test.mykafkacluster.org:28092
33
- protocol: kafka-secure
34
- description: Test broker secured with X509
35
- security:
36
- - certs: []
37
- tags:
38
- - name: "env:test-mtls"
39
- description: "This environment is meant for running internal tests through mtls"
40
- - name: "kind:remote"
41
- description: "This server is a remote server. Not exposed by the application"
42
- - name: "visibility:private"
43
- description: "This resource is private and only available to certain users"
44
-
45
- defaultContentType: application/json
46
-
47
- channels:
48
- smartylighting.streetlights.1.0.event.{streetlightId}.lighting.measured:
49
- description: The topic on which measured values may be produced and consumed.
50
- parameters:
51
- streetlightId:
52
- $ref: '#/components/parameters/streetlightId'
53
- publish:
54
- summary: Inform about environmental lighting conditions of a particular streetlight.
55
- operationId: receiveLightMeasurement
56
- traits:
57
- - $ref: '#/components/operationTraits/kafka'
58
- message:
59
- $ref: '#/components/messages/lightMeasured'
60
-
61
- smartylighting.streetlights.1.0.action.{streetlightId}.turn.on:
62
- parameters:
63
- streetlightId:
64
- $ref: '#/components/parameters/streetlightId'
65
- subscribe:
66
- operationId: turnOn
67
- traits:
68
- - $ref: '#/components/operationTraits/kafka'
69
- message:
70
- $ref: '#/components/messages/turnOnOff'
71
-
72
- smartylighting.streetlights.1.0.action.{streetlightId}.turn.off:
73
- parameters:
74
- streetlightId:
75
- $ref: '#/components/parameters/streetlightId'
76
- subscribe:
77
- operationId: turnOff
78
- traits:
79
- - $ref: '#/components/operationTraits/kafka'
80
- message:
81
- $ref: '#/components/messages/turnOnOff'
82
-
83
- smartylighting.streetlights.1.0.action.{streetlightId}.dim:
84
- parameters:
85
- streetlightId:
86
- $ref: '#/components/parameters/streetlightId'
87
- subscribe:
88
- operationId: dimLight
89
- traits:
90
- - $ref: '#/components/operationTraits/kafka'
91
- message:
92
- $ref: '#/components/messages/dimLight'
93
-
94
- components:
95
- messages:
96
- lightMeasured:
97
- name: lightMeasured
98
- title: Light measured
99
- summary: Inform about environmental lighting conditions of a particular streetlight.
100
- contentType: application/json
101
- traits:
102
- - $ref: '#/components/messageTraits/commonHeaders'
103
- payload:
104
- $ref: "#/components/schemas/lightMeasuredPayload"
105
- turnOnOff:
106
- name: turnOnOff
107
- title: Turn on/off
108
- summary: Command a particular streetlight to turn the lights on or off.
109
- traits:
110
- - $ref: '#/components/messageTraits/commonHeaders'
111
- payload:
112
- $ref: "#/components/schemas/turnOnOffPayload"
113
- dimLight:
114
- name: dimLight
115
- title: Dim light
116
- summary: Command a particular streetlight to dim the lights.
117
- traits:
118
- - $ref: '#/components/messageTraits/commonHeaders'
119
- payload:
120
- $ref: "#/components/schemas/dimLightPayload"
121
-
122
- schemas:
123
- lightMeasuredPayload:
124
- type: object
125
- properties:
126
- lumens:
127
- type: integer
128
- minimum: 0
129
- description: Light intensity measured in lumens.
130
- sentAt:
131
- $ref: "#/components/schemas/sentAt"
132
- turnOnOffPayload:
133
- type: object
134
- properties:
135
- command:
136
- type: string
137
- enum:
138
- - on
139
- - off
140
- description: Whether to turn on or off the light.
141
- sentAt:
142
- $ref: "#/components/schemas/sentAt"
143
- dimLightPayload:
144
- type: object
145
- properties:
146
- percentage:
147
- type: integer
148
- description: Percentage to which the light should be dimmed to.
149
- minimum: 0
150
- maximum: 100
151
- sentAt:
152
- $ref: "#/components/schemas/sentAt"
153
- sentAt:
154
- type: string
155
- format: date-time
156
- description: Date and time when the message was sent.
157
-
158
- securitySchemes:
159
- saslScram:
160
- type: scramSha256
161
- description: Provide your username and password for SASL/SCRAM authentication
162
- certs:
163
- type: X509
164
- description: Download the certificate files from service provider
165
-
166
- parameters:
167
- streetlightId:
168
- description: The ID of the streetlight.
169
- schema:
170
- type: string
171
-
172
- messageTraits:
173
- commonHeaders:
174
- headers:
175
- type: object
176
- properties:
177
- my-app-header:
178
- type: integer
179
- minimum: 0
180
- maximum: 100
181
-
182
- operationTraits:
183
- kafka:
184
- bindings:
185
- kafka:
186
- clientId:
187
- type: string
188
- enum: ['my-app-id']
@@ -1,216 +0,0 @@
1
- asyncapi: '2.6.0'
2
- info:
3
- title: Streetlights MQTT API
4
- version: '1.0.0'
5
- description: |
6
- The Smartylighting Streetlights API allows you to remotely manage the city lights.
7
-
8
- ### Check out its awesome features:
9
-
10
- * Turn a specific streetlight on/off 🌃
11
- * Dim a specific streetlight 😎
12
- * Receive real-time information about environmental lighting conditions 📈
13
- license:
14
- name: Apache 2.0
15
- url: https://www.apache.org/licenses/LICENSE-2.0
16
-
17
- servers:
18
- production:
19
- url: test.mosquitto.org:{port}
20
- protocol: mqtt
21
- description: Test broker
22
- variables:
23
- port:
24
- description: Secure connection (TLS) is available through port 8883.
25
- default: '1883'
26
- enum:
27
- - '1883'
28
- - '8883'
29
- security:
30
- - apiKey: []
31
- - supportedOauthFlows:
32
- - streetlights:on
33
- - streetlights:off
34
- - streetlights:dim
35
- - openIdConnectWellKnown: []
36
- tags:
37
- - name: "env:production"
38
- description: "This environment is meant for production use case"
39
- - name: "kind:remote"
40
- description: "This server is a remote server. Not exposed by the application"
41
- - name: "visibility:public"
42
- description: "This resource is public and available to everyone"
43
-
44
- defaultContentType: application/json
45
-
46
- channels:
47
- smartylighting/streetlights/1/0/event/{streetlightId}/lighting/measured:
48
- description: The topic on which measured values may be produced and consumed.
49
- parameters:
50
- streetlightId:
51
- $ref: '#/components/parameters/streetlightId'
52
- publish:
53
- summary: Inform about environmental lighting conditions of a particular streetlight.
54
- operationId: receiveLightMeasurement
55
- traits:
56
- - $ref: '#/components/operationTraits/mqtt'
57
- message:
58
- $ref: '#/components/messages/lightMeasured'
59
-
60
- smartylighting/streetlights/1/0/action/{streetlightId}/turn/on:
61
- parameters:
62
- streetlightId:
63
- $ref: '#/components/parameters/streetlightId'
64
- subscribe:
65
- operationId: turnOn
66
- traits:
67
- - $ref: '#/components/operationTraits/mqtt'
68
- message:
69
- $ref: '#/components/messages/turnOnOff'
70
-
71
- smartylighting/streetlights/1/0/action/{streetlightId}/turn/off:
72
- parameters:
73
- streetlightId:
74
- $ref: '#/components/parameters/streetlightId'
75
- subscribe:
76
- operationId: turnOff
77
- traits:
78
- - $ref: '#/components/operationTraits/mqtt'
79
- message:
80
- $ref: '#/components/messages/turnOnOff'
81
-
82
- smartylighting/streetlights/1/0/action/{streetlightId}/dim:
83
- parameters:
84
- streetlightId:
85
- $ref: '#/components/parameters/streetlightId'
86
- subscribe:
87
- operationId: dimLight
88
- traits:
89
- - $ref: '#/components/operationTraits/mqtt'
90
- message:
91
- $ref: '#/components/messages/dimLight'
92
-
93
- components:
94
- messages:
95
- lightMeasured:
96
- name: lightMeasured
97
- title: Light measured
98
- summary: Inform about environmental lighting conditions of a particular streetlight.
99
- contentType: application/json
100
- traits:
101
- - $ref: '#/components/messageTraits/commonHeaders'
102
- payload:
103
- $ref: "#/components/schemas/lightMeasuredPayload"
104
- turnOnOff:
105
- name: turnOnOff
106
- title: Turn on/off
107
- summary: Command a particular streetlight to turn the lights on or off.
108
- traits:
109
- - $ref: '#/components/messageTraits/commonHeaders'
110
- payload:
111
- $ref: "#/components/schemas/turnOnOffPayload"
112
- dimLight:
113
- name: dimLight
114
- title: Dim light
115
- summary: Command a particular streetlight to dim the lights.
116
- traits:
117
- - $ref: '#/components/messageTraits/commonHeaders'
118
- payload:
119
- $ref: "#/components/schemas/dimLightPayload"
120
-
121
- schemas:
122
- lightMeasuredPayload:
123
- type: object
124
- properties:
125
- lumens:
126
- type: integer
127
- minimum: 0
128
- description: Light intensity measured in lumens.
129
- sentAt:
130
- $ref: "#/components/schemas/sentAt"
131
- turnOnOffPayload:
132
- type: object
133
- properties:
134
- command:
135
- type: string
136
- enum:
137
- - on
138
- - off
139
- description: Whether to turn on or off the light.
140
- sentAt:
141
- $ref: "#/components/schemas/sentAt"
142
- dimLightPayload:
143
- type: object
144
- properties:
145
- percentage:
146
- type: integer
147
- description: Percentage to which the light should be dimmed to.
148
- minimum: 0
149
- maximum: 100
150
- sentAt:
151
- $ref: "#/components/schemas/sentAt"
152
- sentAt:
153
- type: string
154
- format: date-time
155
- description: Date and time when the message was sent.
156
-
157
- securitySchemes:
158
- apiKey:
159
- type: apiKey
160
- in: user
161
- description: Provide your API key as the user and leave the password empty.
162
- supportedOauthFlows:
163
- type: oauth2
164
- description: Flows to support OAuth 2.0
165
- flows:
166
- implicit:
167
- authorizationUrl: 'https://authserver.example/auth'
168
- scopes:
169
- 'streetlights:on': Ability to switch lights on
170
- 'streetlights:off': Ability to switch lights off
171
- 'streetlights:dim': Ability to dim the lights
172
- password:
173
- tokenUrl: 'https://authserver.example/token'
174
- scopes:
175
- 'streetlights:on': Ability to switch lights on
176
- 'streetlights:off': Ability to switch lights off
177
- 'streetlights:dim': Ability to dim the lights
178
- clientCredentials:
179
- tokenUrl: 'https://authserver.example/token'
180
- scopes:
181
- 'streetlights:on': Ability to switch lights on
182
- 'streetlights:off': Ability to switch lights off
183
- 'streetlights:dim': Ability to dim the lights
184
- authorizationCode:
185
- authorizationUrl: 'https://authserver.example/auth'
186
- tokenUrl: 'https://authserver.example/token'
187
- refreshUrl: 'https://authserver.example/refresh'
188
- scopes:
189
- 'streetlights:on': Ability to switch lights on
190
- 'streetlights:off': Ability to switch lights off
191
- 'streetlights:dim': Ability to dim the lights
192
- openIdConnectWellKnown:
193
- type: openIdConnect
194
- openIdConnectUrl: 'https://authserver.example/.well-known'
195
-
196
- parameters:
197
- streetlightId:
198
- description: The ID of the streetlight.
199
- schema:
200
- type: string
201
-
202
- messageTraits:
203
- commonHeaders:
204
- headers:
205
- type: object
206
- properties:
207
- my-app-header:
208
- type: integer
209
- minimum: 0
210
- maximum: 100
211
-
212
- operationTraits:
213
- mqtt:
214
- bindings:
215
- mqtt:
216
- qos: 1
@@ -1,212 +0,0 @@
1
- asyncapi: '2.6.0'
2
- info:
3
- title: Streetlights Kafka API
4
- version: '1.0.0'
5
- description: |
6
- The Smartylighting Streetlights API allows you to remotely manage the city lights.
7
-
8
- ### Check out its awesome features:
9
-
10
- * Turn a specific streetlight on/off 🌃
11
- * Dim a specific streetlight 😎
12
- * Receive real-time information about environmental lighting conditions 📈
13
- license:
14
- name: Apache 2.0
15
- url: https://www.apache.org/licenses/LICENSE-2.0
16
-
17
- servers:
18
- test:
19
- url: test.mykafkacluster.org:8092
20
- protocol: kafka-secure
21
- description: Test broker
22
- security:
23
- - saslScram: []
24
- test_oauth:
25
- url: test.mykafkacluster.org:8093
26
- protocol: kafka-secure
27
- description: Test port for oauth
28
- security:
29
- - streetlights_auth:
30
- - streetlights:write
31
- - streetlights:read
32
-
33
-
34
- defaultContentType: application/json
35
-
36
- channels:
37
- smartylighting.streetlights.1.0.event.{streetlightId}.lighting.measured:
38
- description: The topic on which measured values may be produced and consumed.
39
- servers:
40
- - test
41
- parameters:
42
- streetlightId:
43
- $ref: '#/components/parameters/streetlightId'
44
- publish:
45
- summary: Inform about environmental lighting conditions of a particular streetlight.
46
- operationId: receiveLightMeasurement
47
- traits:
48
- - $ref: '#/components/operationTraits/kafka'
49
- message:
50
- $ref: '#/components/messages/lightMeasured'
51
-
52
- smartylighting.streetlights.1.0.action.{streetlightId}.turn.on:
53
- servers:
54
- - test_oauth
55
- parameters:
56
- streetlightId:
57
- $ref: '#/components/parameters/streetlightId'
58
- subscribe:
59
- operationId: turnOn
60
- traits:
61
- - $ref: '#/components/operationTraits/kafka'
62
- message:
63
- $ref: '#/components/messages/turnOnOff'
64
- security:
65
- # This operation level security implies the ability to subscribe to messages from
66
- # `smartylighting.streetlights.1.0.action.{streetlightId}.turn.on` channel with Authorization headers
67
- # that have `streetlights:read` scope. Note that an operation level security must still satisfy
68
- # security requirements specified at the server level.
69
- - streetlights_auth:
70
- - streetlights:read
71
-
72
- smartylighting.streetlights.1.0.action.{streetlightId}.turn.off:
73
- servers:
74
- - test_oauth
75
- parameters:
76
- streetlightId:
77
- $ref: '#/components/parameters/streetlightId'
78
- subscribe:
79
- operationId: turnOff
80
- traits:
81
- - $ref: '#/components/operationTraits/kafka'
82
- message:
83
- $ref: '#/components/messages/turnOnOff'
84
- security:
85
- # This operation level security implies the ability to subscribe to messages from
86
- # `smartylighting.streetlights.1.0.action.{streetlightId}.turn.off` channel with Authorization headers
87
- # that have `streetlights:read` scope. Note that an operation level security must still satisfy
88
- # security options specified at the server level.
89
- - streetlights_auth:
90
- - streetlights:read
91
- smartylighting.streetlights.1.0.action.{streetlightId}.dim:
92
- servers:
93
- - test_oauth
94
- parameters:
95
- streetlightId:
96
- $ref: '#/components/parameters/streetlightId'
97
- subscribe:
98
- operationId: dimLight
99
- traits:
100
- - $ref: '#/components/operationTraits/kafka'
101
- message:
102
- $ref: '#/components/messages/dimLight'
103
- security:
104
- # This operation level security implies the ability to subscribe to messages from
105
- # `smartylighting.streetlights.1.0.action.{streetlightId}.dim` channel with Authorization headers
106
- # that have `streetlights:read` scope. Note that an operation level security must still satisfy
107
- # security options specified at the server level.
108
- - streetlights_auth:
109
- - streetlights:read
110
-
111
-
112
- components:
113
- messages:
114
- lightMeasured:
115
- name: lightMeasured
116
- title: Light measured
117
- summary: Inform about environmental lighting conditions of a particular streetlight.
118
- contentType: application/json
119
- traits:
120
- - $ref: '#/components/messageTraits/commonHeaders'
121
- payload:
122
- $ref: "#/components/schemas/lightMeasuredPayload"
123
- turnOnOff:
124
- name: turnOnOff
125
- title: Turn on/off
126
- summary: Command a particular streetlight to turn the lights on or off.
127
- traits:
128
- - $ref: '#/components/messageTraits/commonHeaders'
129
- payload:
130
- $ref: "#/components/schemas/turnOnOffPayload"
131
- dimLight:
132
- name: dimLight
133
- title: Dim light
134
- summary: Command a particular streetlight to dim the lights.
135
- traits:
136
- - $ref: '#/components/messageTraits/commonHeaders'
137
- payload:
138
- $ref: "#/components/schemas/dimLightPayload"
139
-
140
- schemas:
141
- lightMeasuredPayload:
142
- type: object
143
- properties:
144
- lumens:
145
- type: integer
146
- minimum: 0
147
- description: Light intensity measured in lumens.
148
- sentAt:
149
- $ref: "#/components/schemas/sentAt"
150
- turnOnOffPayload:
151
- type: object
152
- properties:
153
- command:
154
- type: string
155
- enum:
156
- - on
157
- - off
158
- description: Whether to turn on or off the light.
159
- sentAt:
160
- $ref: "#/components/schemas/sentAt"
161
- dimLightPayload:
162
- type: object
163
- properties:
164
- percentage:
165
- type: integer
166
- description: Percentage to which the light should be dimmed to.
167
- minimum: 0
168
- maximum: 100
169
- sentAt:
170
- $ref: "#/components/schemas/sentAt"
171
- sentAt:
172
- type: string
173
- format: date-time
174
- description: Date and time when the message was sent.
175
-
176
- securitySchemes:
177
- saslScram:
178
- type: scramSha256
179
- description: Provide your username and password for SASL/SCRAM authentication
180
- streetlights_auth:
181
- type: oauth2
182
- description: The oauth security descriptions
183
- flows:
184
- clientCredentials:
185
- tokenUrl: 'https://example.com/api/oauth/dialog'
186
- scopes:
187
- streetlights:read: Scope required for subscribing to channel
188
- streetlights:write: Scope required for publishing to channel
189
-
190
- parameters:
191
- streetlightId:
192
- description: The ID of the streetlight.
193
- schema:
194
- type: string
195
-
196
- messageTraits:
197
- commonHeaders:
198
- headers:
199
- type: object
200
- properties:
201
- my-app-header:
202
- type: integer
203
- minimum: 0
204
- maximum: 100
205
-
206
- operationTraits:
207
- kafka:
208
- bindings:
209
- kafka:
210
- clientId:
211
- type: string
212
- enum: ['my-app-id']