@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
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
asyncapi:
|
|
1
|
+
asyncapi: 3.0.0
|
|
2
2
|
info:
|
|
3
3
|
title: Application Headers example
|
|
4
|
-
version:
|
|
5
|
-
description: A cut of the Streetlights API to test application header changes supporting
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
description: A cut of the Streetlights API to test application header changes supporting
|
|
6
6
|
license:
|
|
7
7
|
name: Apache 2.0
|
|
8
|
-
url: https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
|
|
8
|
+
url: 'https://www.apache.org/licenses/LICENSE-2.0'
|
|
9
|
+
defaultContentType: application/json
|
|
10
10
|
servers:
|
|
11
11
|
production:
|
|
12
|
-
|
|
12
|
+
host: 'test.mosquitto.org:{port}'
|
|
13
13
|
protocol: mqtt
|
|
14
14
|
description: Test broker
|
|
15
15
|
variables:
|
|
@@ -19,28 +19,35 @@ servers:
|
|
|
19
19
|
enum:
|
|
20
20
|
- '1883'
|
|
21
21
|
- '8883'
|
|
22
|
-
|
|
23
|
-
defaultContentType: application/json
|
|
24
|
-
|
|
25
22
|
channels:
|
|
26
|
-
|
|
23
|
+
lightingMeasured:
|
|
24
|
+
address: 'smartylighting/streetlights/1/0/event/{streetlightId}/lighting/measured'
|
|
25
|
+
messages:
|
|
26
|
+
lightMeasured:
|
|
27
|
+
$ref: '#/components/messages/lightMeasured'
|
|
27
28
|
parameters:
|
|
28
29
|
streetlightId:
|
|
29
30
|
$ref: '#/components/parameters/streetlightId'
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
operations:
|
|
32
|
+
receiveLightMeasurement:
|
|
33
|
+
action: receive
|
|
34
|
+
channel:
|
|
35
|
+
$ref: '#/channels/lightingMeasured'
|
|
36
|
+
summary: >-
|
|
37
|
+
Inform about environmental lighting conditions of a particular
|
|
38
|
+
streetlight.
|
|
39
|
+
messages:
|
|
40
|
+
- $ref: '#/channels/lightingMeasured/messages/lightMeasured'
|
|
36
41
|
components:
|
|
37
42
|
messages:
|
|
38
43
|
lightMeasured:
|
|
39
44
|
name: lightMeasured
|
|
40
45
|
title: Light measured
|
|
41
|
-
summary:
|
|
46
|
+
summary: >-
|
|
47
|
+
Inform about environmental lighting conditions of a particular
|
|
48
|
+
streetlight.
|
|
42
49
|
correlationId:
|
|
43
|
-
location:
|
|
50
|
+
location: $message.header#/MQMD/CorrelId
|
|
44
51
|
contentType: application/json
|
|
45
52
|
headers:
|
|
46
53
|
type: object
|
|
@@ -54,10 +61,9 @@ components:
|
|
|
54
61
|
maxLength: 24
|
|
55
62
|
format: binary
|
|
56
63
|
applicationInstanceId:
|
|
57
|
-
$ref:
|
|
64
|
+
$ref: '#/components/schemas/applicationInstanceId'
|
|
58
65
|
payload:
|
|
59
|
-
$ref:
|
|
60
|
-
|
|
66
|
+
$ref: '#/components/schemas/lightMeasuredPayload'
|
|
61
67
|
schemas:
|
|
62
68
|
lightMeasuredPayload:
|
|
63
69
|
type: object
|
|
@@ -67,7 +73,7 @@ components:
|
|
|
67
73
|
minimum: 0
|
|
68
74
|
description: Light intensity measured in lumens.
|
|
69
75
|
sentAt:
|
|
70
|
-
$ref:
|
|
76
|
+
$ref: '#/components/schemas/sentAt'
|
|
71
77
|
sentAt:
|
|
72
78
|
type: string
|
|
73
79
|
format: date-time
|
|
@@ -75,9 +81,6 @@ components:
|
|
|
75
81
|
applicationInstanceId:
|
|
76
82
|
description: Unique identifier for a given instance of the publishing application
|
|
77
83
|
type: string
|
|
78
|
-
|
|
79
84
|
parameters:
|
|
80
85
|
streetlightId:
|
|
81
|
-
description: The ID of the streetlight.
|
|
82
|
-
schema:
|
|
83
|
-
type: string
|
|
86
|
+
description: The ID of the streetlight.
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
asyncapi:
|
|
1
|
+
asyncapi: 3.0.0
|
|
2
2
|
info:
|
|
3
3
|
title: Correlation ID Example
|
|
4
|
-
version:
|
|
4
|
+
version: 1.0.0
|
|
5
5
|
description: A cut of the Streetlights API to test Correlation ID
|
|
6
6
|
license:
|
|
7
7
|
name: Apache 2.0
|
|
8
|
-
url: https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
|
|
8
|
+
url: 'https://www.apache.org/licenses/LICENSE-2.0'
|
|
9
|
+
defaultContentType: application/json
|
|
10
10
|
servers:
|
|
11
11
|
production:
|
|
12
|
-
|
|
12
|
+
host: 'test.mosquitto.org:{port}'
|
|
13
13
|
protocol: mqtt
|
|
14
14
|
description: Test broker
|
|
15
15
|
variables:
|
|
@@ -20,55 +20,95 @@ servers:
|
|
|
20
20
|
- '1883'
|
|
21
21
|
- '8883'
|
|
22
22
|
security:
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
23
|
+
- $ref: '#/components/securitySchemes/apiKey'
|
|
24
|
+
- type: oauth2
|
|
25
|
+
description: Flows to support OAuth 2.0
|
|
26
|
+
flows:
|
|
27
|
+
implicit:
|
|
28
|
+
authorizationUrl: 'https://authserver.example/auth'
|
|
29
|
+
availableScopes:
|
|
30
|
+
'streetlights:on': Ability to switch lights on
|
|
31
|
+
'streetlights:off': Ability to switch lights off
|
|
32
|
+
'streetlights:dim': Ability to dim the lights
|
|
33
|
+
password:
|
|
34
|
+
tokenUrl: 'https://authserver.example/token'
|
|
35
|
+
availableScopes:
|
|
36
|
+
'streetlights:on': Ability to switch lights on
|
|
37
|
+
'streetlights:off': Ability to switch lights off
|
|
38
|
+
'streetlights:dim': Ability to dim the lights
|
|
39
|
+
clientCredentials:
|
|
40
|
+
tokenUrl: 'https://authserver.example/token'
|
|
41
|
+
availableScopes:
|
|
42
|
+
'streetlights:on': Ability to switch lights on
|
|
43
|
+
'streetlights:off': Ability to switch lights off
|
|
44
|
+
'streetlights:dim': Ability to dim the lights
|
|
45
|
+
authorizationCode:
|
|
46
|
+
authorizationUrl: 'https://authserver.example/auth'
|
|
47
|
+
tokenUrl: 'https://authserver.example/token'
|
|
48
|
+
refreshUrl: 'https://authserver.example/refresh'
|
|
49
|
+
availableScopes:
|
|
50
|
+
'streetlights:on': Ability to switch lights on
|
|
51
|
+
'streetlights:off': Ability to switch lights off
|
|
52
|
+
'streetlights:dim': Ability to dim the lights
|
|
53
|
+
scopes:
|
|
54
|
+
- 'streetlights:on'
|
|
55
|
+
- 'streetlights:off'
|
|
56
|
+
- 'streetlights:dim'
|
|
57
|
+
- $ref: '#/components/securitySchemes/openIdConnectWellKnown'
|
|
32
58
|
channels:
|
|
33
|
-
|
|
59
|
+
lightingMeasured:
|
|
60
|
+
address: 'smartylighting/streetlights/1/0/event/{streetlightId}/lighting/measured'
|
|
61
|
+
messages:
|
|
62
|
+
lightMeasured:
|
|
63
|
+
$ref: '#/components/messages/lightMeasured'
|
|
34
64
|
parameters:
|
|
35
65
|
streetlightId:
|
|
36
66
|
$ref: '#/components/parameters/streetlightId'
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
$ref: '#/components/messages/
|
|
42
|
-
|
|
43
|
-
smartylighting/streetlights/1/0/action/{streetlightId}/dim:
|
|
67
|
+
lightsDim:
|
|
68
|
+
address: 'smartylighting/streetlights/1/0/action/{streetlightId}/dim'
|
|
69
|
+
messages:
|
|
70
|
+
dimLight:
|
|
71
|
+
$ref: '#/components/messages/dimLight'
|
|
44
72
|
parameters:
|
|
45
73
|
streetlightId:
|
|
46
74
|
$ref: '#/components/parameters/streetlightId'
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
75
|
+
operations:
|
|
76
|
+
receiveLightMeasurement:
|
|
77
|
+
action: receive
|
|
78
|
+
channel:
|
|
79
|
+
$ref: '#/channels/lightingMeasured'
|
|
80
|
+
summary: >-
|
|
81
|
+
Inform about environmental lighting conditions of a particular
|
|
82
|
+
streetlight.
|
|
83
|
+
messages:
|
|
84
|
+
- $ref: '#/channels/lightingMeasured/messages/lightMeasured'
|
|
85
|
+
dimLight:
|
|
86
|
+
action: send
|
|
87
|
+
channel:
|
|
88
|
+
$ref: '#/channels/lightsDim'
|
|
89
|
+
messages:
|
|
90
|
+
- $ref: '#/channels/lightsDim/messages/dimLight'
|
|
52
91
|
components:
|
|
53
92
|
messages:
|
|
54
93
|
lightMeasured:
|
|
55
94
|
name: lightMeasured
|
|
56
95
|
title: Light measured
|
|
57
|
-
summary:
|
|
96
|
+
summary: >-
|
|
97
|
+
Inform about environmental lighting conditions of a particular
|
|
98
|
+
streetlight.
|
|
58
99
|
correlationId:
|
|
59
|
-
location:
|
|
100
|
+
location: $message.header#/MQMD/CorrelId
|
|
60
101
|
contentType: application/json
|
|
61
102
|
payload:
|
|
62
|
-
$ref:
|
|
103
|
+
$ref: '#/components/schemas/lightMeasuredPayload'
|
|
63
104
|
dimLight:
|
|
64
105
|
name: dimLight
|
|
65
106
|
title: Dim light
|
|
66
107
|
summary: Command a particular streetlight to dim the lights.
|
|
67
108
|
correlationId:
|
|
68
|
-
$ref:
|
|
109
|
+
$ref: '#/components/correlationIds/sentAtCorrelator'
|
|
69
110
|
payload:
|
|
70
|
-
$ref:
|
|
71
|
-
|
|
111
|
+
$ref: '#/components/schemas/dimLightPayload'
|
|
72
112
|
schemas:
|
|
73
113
|
lightMeasuredPayload:
|
|
74
114
|
type: object
|
|
@@ -78,7 +118,7 @@ components:
|
|
|
78
118
|
minimum: 0
|
|
79
119
|
description: Light intensity measured in lumens.
|
|
80
120
|
sentAt:
|
|
81
|
-
$ref:
|
|
121
|
+
$ref: '#/components/schemas/sentAt'
|
|
82
122
|
dimLightPayload:
|
|
83
123
|
type: object
|
|
84
124
|
properties:
|
|
@@ -88,18 +128,14 @@ components:
|
|
|
88
128
|
minimum: 0
|
|
89
129
|
maximum: 100
|
|
90
130
|
sentAt:
|
|
91
|
-
$ref:
|
|
131
|
+
$ref: '#/components/schemas/sentAt'
|
|
92
132
|
sentAt:
|
|
93
133
|
type: string
|
|
94
134
|
format: date-time
|
|
95
135
|
description: Date and time when the message was sent.
|
|
96
|
-
|
|
97
136
|
parameters:
|
|
98
137
|
streetlightId:
|
|
99
138
|
description: The ID of the streetlight.
|
|
100
|
-
schema:
|
|
101
|
-
type: string
|
|
102
|
-
|
|
103
139
|
correlationIds:
|
|
104
140
|
sentAtCorrelator:
|
|
105
141
|
description: Data from message payload used as correlation ID
|
|
@@ -115,19 +151,19 @@ components:
|
|
|
115
151
|
flows:
|
|
116
152
|
implicit:
|
|
117
153
|
authorizationUrl: 'https://authserver.example/auth'
|
|
118
|
-
|
|
154
|
+
availableScopes:
|
|
119
155
|
'streetlights:on': Ability to switch lights on
|
|
120
156
|
'streetlights:off': Ability to switch lights off
|
|
121
157
|
'streetlights:dim': Ability to dim the lights
|
|
122
158
|
password:
|
|
123
159
|
tokenUrl: 'https://authserver.example/token'
|
|
124
|
-
|
|
160
|
+
availableScopes:
|
|
125
161
|
'streetlights:on': Ability to switch lights on
|
|
126
162
|
'streetlights:off': Ability to switch lights off
|
|
127
163
|
'streetlights:dim': Ability to dim the lights
|
|
128
164
|
clientCredentials:
|
|
129
165
|
tokenUrl: 'https://authserver.example/token'
|
|
130
|
-
|
|
166
|
+
availableScopes:
|
|
131
167
|
'streetlights:on': Ability to switch lights on
|
|
132
168
|
'streetlights:off': Ability to switch lights off
|
|
133
169
|
'streetlights:dim': Ability to dim the lights
|
|
@@ -135,10 +171,10 @@ components:
|
|
|
135
171
|
authorizationUrl: 'https://authserver.example/auth'
|
|
136
172
|
tokenUrl: 'https://authserver.example/token'
|
|
137
173
|
refreshUrl: 'https://authserver.example/refresh'
|
|
138
|
-
|
|
174
|
+
availableScopes:
|
|
139
175
|
'streetlights:on': Ability to switch lights on
|
|
140
176
|
'streetlights:off': Ability to switch lights off
|
|
141
177
|
'streetlights:dim': Ability to dim the lights
|
|
142
178
|
openIdConnectWellKnown:
|
|
143
179
|
type: openIdConnect
|
|
144
|
-
openIdConnectUrl: 'https://authserver.example/.well-known'
|
|
180
|
+
openIdConnectUrl: 'https://authserver.example/.well-known'
|
|
@@ -1,55 +1,67 @@
|
|
|
1
1
|
[
|
|
2
2
|
{
|
|
3
3
|
"name": "Account Service",
|
|
4
|
-
"value": "simple.yml"
|
|
4
|
+
"value": "simple-asyncapi.yml"
|
|
5
|
+
},
|
|
6
|
+
{
|
|
7
|
+
"name": "Adeo AsyncAPI Case Study - (protocols: kafka,kafka,kafka)",
|
|
8
|
+
"value": "adeo-kafka-request-reply-asyncapi.yml"
|
|
5
9
|
},
|
|
6
10
|
{
|
|
7
11
|
"name": "AnyOf example",
|
|
8
|
-
"value": "anyof.yml"
|
|
12
|
+
"value": "anyof-asyncapi.yml"
|
|
9
13
|
},
|
|
10
14
|
{
|
|
11
15
|
"name": "Application Headers example - (protocols: mqtt)",
|
|
12
|
-
"value": "application-headers.yml"
|
|
16
|
+
"value": "application-headers-asyncapi.yml"
|
|
13
17
|
},
|
|
14
18
|
{
|
|
15
19
|
"name": "Correlation ID Example - (protocols: mqtt)",
|
|
16
|
-
"value": "correlation-id.yml"
|
|
20
|
+
"value": "correlation-id-asyncapi.yml"
|
|
17
21
|
},
|
|
18
22
|
{
|
|
19
23
|
"name": "Gemini Market Data Websocket API - (protocols: wss)",
|
|
20
|
-
"value": "websocket-gemini.yml"
|
|
24
|
+
"value": "websocket-gemini-asyncapi.yml"
|
|
21
25
|
},
|
|
22
26
|
{
|
|
23
27
|
"name": "Gitter Streaming API - (protocols: https)",
|
|
24
|
-
"value": "gitter-streaming.yml"
|
|
28
|
+
"value": "gitter-streaming-asyncapi.yml"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"name": "Kraken Websockets API",
|
|
32
|
+
"value": "kraken-websocket-request-reply-message-filter-in-reply-asyncapi.yml"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"name": "Kraken Websockets API",
|
|
36
|
+
"value": "kraken-websocket-request-reply-multiple-channels-asyncapi.yml"
|
|
25
37
|
},
|
|
26
38
|
{
|
|
27
39
|
"name": "Mercure Hub Example - (protocols: mercure)",
|
|
28
|
-
"value": "mercure.yml"
|
|
40
|
+
"value": "mercure-asyncapi.yml"
|
|
29
41
|
},
|
|
30
42
|
{
|
|
31
43
|
"name": "Not example",
|
|
32
|
-
"value": "not.yml"
|
|
44
|
+
"value": "not-asyncapi.yml"
|
|
33
45
|
},
|
|
34
46
|
{
|
|
35
47
|
"name": "Notifications",
|
|
36
|
-
"value": "operation-security.yml"
|
|
48
|
+
"value": "operation-security-asyncapi.yml"
|
|
37
49
|
},
|
|
38
50
|
{
|
|
39
51
|
"name": "OneOf example",
|
|
40
|
-
"value": "oneof.yml"
|
|
52
|
+
"value": "oneof-asyncapi.yml"
|
|
41
53
|
},
|
|
42
54
|
{
|
|
43
55
|
"name": "RPC Client Example - (protocols: amqp)",
|
|
44
|
-
"value": "rpc-client.yml"
|
|
56
|
+
"value": "rpc-client-asyncapi.yml"
|
|
45
57
|
},
|
|
46
58
|
{
|
|
47
59
|
"name": "RPC Server Example - (protocols: amqp)",
|
|
48
|
-
"value": "rpc-server.yml"
|
|
60
|
+
"value": "rpc-server-asyncapi.yml"
|
|
49
61
|
},
|
|
50
62
|
{
|
|
51
63
|
"name": "Slack Real Time Messaging API - (protocols: https)",
|
|
52
|
-
"value": "slack-rtm.yml"
|
|
64
|
+
"value": "slack-rtm-asyncapi.yml"
|
|
53
65
|
},
|
|
54
66
|
{
|
|
55
67
|
"name": "Streetlights App - (protocols: mqtt)",
|
|
@@ -57,14 +69,14 @@
|
|
|
57
69
|
},
|
|
58
70
|
{
|
|
59
71
|
"name": "Streetlights Kafka API - (protocols: kafka-secure,kafka-secure)",
|
|
60
|
-
"value": "streetlights-kafka.yml"
|
|
72
|
+
"value": "streetlights-kafka-asyncapi.yml"
|
|
61
73
|
},
|
|
62
74
|
{
|
|
63
75
|
"name": "Streetlights Kafka API - (protocols: kafka-secure,kafka-secure)",
|
|
64
|
-
"value": "streetlights-operation-security.yml"
|
|
76
|
+
"value": "streetlights-operation-security-asyncapi.yml"
|
|
65
77
|
},
|
|
66
78
|
{
|
|
67
79
|
"name": "Streetlights MQTT API - (protocols: mqtt)",
|
|
68
|
-
"value": "streetlights-mqtt.yml"
|
|
80
|
+
"value": "streetlights-mqtt-asyncapi.yml"
|
|
69
81
|
}
|
|
70
82
|
]
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
asyncapi: 3.0.0
|
|
2
|
+
id: 'tag:stream.gitter.im,2022:api'
|
|
3
|
+
info:
|
|
4
|
+
title: Gitter Streaming API
|
|
5
|
+
version: 1.0.0
|
|
6
|
+
servers:
|
|
7
|
+
production:
|
|
8
|
+
host: stream.gitter.im
|
|
9
|
+
pathname: /v1
|
|
10
|
+
protocol: https
|
|
11
|
+
protocolVersion: '1.1'
|
|
12
|
+
security:
|
|
13
|
+
- $ref: '#/components/securitySchemes/httpBearerToken'
|
|
14
|
+
channels:
|
|
15
|
+
rooms:
|
|
16
|
+
address: '/rooms/{roomId}/{resource}'
|
|
17
|
+
messages:
|
|
18
|
+
chatMessage:
|
|
19
|
+
$ref: '#/components/messages/chatMessage'
|
|
20
|
+
heartbeat:
|
|
21
|
+
$ref: '#/components/messages/heartbeat'
|
|
22
|
+
parameters:
|
|
23
|
+
roomId:
|
|
24
|
+
description: Id of the Gitter room.
|
|
25
|
+
examples:
|
|
26
|
+
- 53307860c3599d1de448e19d
|
|
27
|
+
resource:
|
|
28
|
+
enum:
|
|
29
|
+
- chatMessages
|
|
30
|
+
- events
|
|
31
|
+
description: The resource to consume.
|
|
32
|
+
operations:
|
|
33
|
+
sendRoomInfo:
|
|
34
|
+
action: send
|
|
35
|
+
channel:
|
|
36
|
+
$ref: '#/channels/rooms'
|
|
37
|
+
bindings:
|
|
38
|
+
http:
|
|
39
|
+
method: POST
|
|
40
|
+
messages:
|
|
41
|
+
- $ref: '#/channels/rooms/messages/chatMessage'
|
|
42
|
+
- $ref: '#/channels/rooms/messages/heartbeat'
|
|
43
|
+
components:
|
|
44
|
+
securitySchemes:
|
|
45
|
+
httpBearerToken:
|
|
46
|
+
type: http
|
|
47
|
+
scheme: bearer
|
|
48
|
+
messages:
|
|
49
|
+
chatMessage:
|
|
50
|
+
summary: >-
|
|
51
|
+
A message represents an individual chat message sent to a room. They are
|
|
52
|
+
a sub-resource of a room.
|
|
53
|
+
payload:
|
|
54
|
+
schemaFormat: application/schema+yaml;version=draft-07
|
|
55
|
+
schema:
|
|
56
|
+
type: object
|
|
57
|
+
properties:
|
|
58
|
+
id:
|
|
59
|
+
type: string
|
|
60
|
+
description: ID of the message.
|
|
61
|
+
text:
|
|
62
|
+
type: string
|
|
63
|
+
description: Original message in plain-text/markdown.
|
|
64
|
+
html:
|
|
65
|
+
type: string
|
|
66
|
+
description: HTML formatted message.
|
|
67
|
+
sent:
|
|
68
|
+
type: string
|
|
69
|
+
format: date-time
|
|
70
|
+
description: ISO formatted date of the message.
|
|
71
|
+
fromUser:
|
|
72
|
+
type: object
|
|
73
|
+
description: User that sent the message.
|
|
74
|
+
properties:
|
|
75
|
+
id:
|
|
76
|
+
type: string
|
|
77
|
+
description: Gitter User ID.
|
|
78
|
+
username:
|
|
79
|
+
type: string
|
|
80
|
+
description: Gitter/GitHub username.
|
|
81
|
+
displayName:
|
|
82
|
+
type: string
|
|
83
|
+
description: Gitter/GitHub user real name.
|
|
84
|
+
url:
|
|
85
|
+
type: string
|
|
86
|
+
description: Path to the user on Gitter.
|
|
87
|
+
avatarUrl:
|
|
88
|
+
type: string
|
|
89
|
+
format: uri
|
|
90
|
+
description: User avatar URI.
|
|
91
|
+
avatarUrlSmall:
|
|
92
|
+
type: string
|
|
93
|
+
format: uri
|
|
94
|
+
description: User avatar URI (small).
|
|
95
|
+
avatarUrlMedium:
|
|
96
|
+
type: string
|
|
97
|
+
format: uri
|
|
98
|
+
description: User avatar URI (medium).
|
|
99
|
+
v:
|
|
100
|
+
type: number
|
|
101
|
+
description: Version.
|
|
102
|
+
gv:
|
|
103
|
+
type: string
|
|
104
|
+
description: Stands for "Gravatar version" and is used for cache busting.
|
|
105
|
+
unread:
|
|
106
|
+
type: boolean
|
|
107
|
+
description: Boolean that indicates if the current user has read the message.
|
|
108
|
+
readBy:
|
|
109
|
+
type: number
|
|
110
|
+
description: Number of users that have read the message.
|
|
111
|
+
urls:
|
|
112
|
+
type: array
|
|
113
|
+
description: List of URLs present in the message.
|
|
114
|
+
items:
|
|
115
|
+
type: string
|
|
116
|
+
format: uri
|
|
117
|
+
mentions:
|
|
118
|
+
type: array
|
|
119
|
+
description: List of @Mentions in the message.
|
|
120
|
+
items:
|
|
121
|
+
type: object
|
|
122
|
+
properties:
|
|
123
|
+
screenName:
|
|
124
|
+
type: string
|
|
125
|
+
userId:
|
|
126
|
+
type: string
|
|
127
|
+
userIds:
|
|
128
|
+
type: array
|
|
129
|
+
items:
|
|
130
|
+
type: string
|
|
131
|
+
issues:
|
|
132
|
+
type: array
|
|
133
|
+
description: 'List of #Issues referenced in the message.'
|
|
134
|
+
items:
|
|
135
|
+
type: object
|
|
136
|
+
properties:
|
|
137
|
+
number:
|
|
138
|
+
type: string
|
|
139
|
+
meta:
|
|
140
|
+
type: array
|
|
141
|
+
description: Metadata. This is currently not used for anything.
|
|
142
|
+
items: {}
|
|
143
|
+
v:
|
|
144
|
+
type: number
|
|
145
|
+
description: Version.
|
|
146
|
+
gv:
|
|
147
|
+
type: string
|
|
148
|
+
description: Stands for "Gravatar version" and is used for cache busting.
|
|
149
|
+
bindings:
|
|
150
|
+
http:
|
|
151
|
+
headers:
|
|
152
|
+
type: object
|
|
153
|
+
properties:
|
|
154
|
+
Transfer-Encoding:
|
|
155
|
+
type: string
|
|
156
|
+
const: chunked
|
|
157
|
+
Trailer:
|
|
158
|
+
type: string
|
|
159
|
+
const: \r\n
|
|
160
|
+
heartbeat:
|
|
161
|
+
summary: Its purpose is to keep the connection alive.
|
|
162
|
+
payload:
|
|
163
|
+
schemaFormat: application/schema+yaml;version=draft-07
|
|
164
|
+
schema:
|
|
165
|
+
type: string
|
|
166
|
+
enum:
|
|
167
|
+
- "\r\n"
|
|
168
|
+
bindings:
|
|
169
|
+
http:
|
|
170
|
+
headers:
|
|
171
|
+
type: object
|
|
172
|
+
properties:
|
|
173
|
+
Transfer-Encoding:
|
|
174
|
+
type: string
|
|
175
|
+
const: chunked
|
|
176
|
+
Trailer:
|
|
177
|
+
type: string
|
|
178
|
+
const: \r\n
|