@@ -4,49 +4,51 @@ const schema =
4
4
localStorage . getItem ( 'document' ) || `asyncapi: 3.0.0
5
5
info:
6
6
title: Streetlights Kafka API
7
- version: '1.0.0'
8
- description: |
9
- The Smartylighting Streetlights API allows you to remotely manage the city lights.
7
+ version: 1.0.0
8
+ description: >
9
+ The Smartylighting Streetlights API allows you to remotely manage the city
10
+ lights.
10
11
### Check out its awesome features:
11
- * Turn a specific streetlight on/off 🌃
12
+
13
+ * Turn a specific streetlight on/off 🌃
12
14
* Dim a specific streetlight 😎
13
15
* Receive real-time information about environmental lighting conditions 📈
14
16
license:
15
17
name: Apache 2.0
16
- url: ' https://www.apache.org/licenses/LICENSE-2.0'
18
+ url: https://www.apache.org/licenses/LICENSE-2.0
17
19
defaultContentType: application/json
18
20
servers:
19
21
scram-connections:
20
- host: ' test.mykafkacluster.org:18092'
22
+ host: test.mykafkacluster.org:18092
21
23
protocol: kafka-secure
22
24
description: Test broker secured with scramSha256
23
25
security:
24
26
- $ref: '#/components/securitySchemes/saslScram'
25
27
tags:
26
- - name: ' env:test-scram'
28
+ - name: env:test-scram
27
29
description: >-
28
30
This environment is meant for running internal tests through
29
31
scramSha256
30
- - name: ' kind:remote'
32
+ - name: kind:remote
31
33
description: This server is a remote server. Not exposed by the application
32
- - name: ' visibility:private'
34
+ - name: visibility:private
33
35
description: This resource is private and only available to certain users
34
36
mtls-connections:
35
- host: ' test.mykafkacluster.org:28092'
37
+ host: test.mykafkacluster.org:28092
36
38
protocol: kafka-secure
37
39
description: Test broker secured with X509
38
40
security:
39
41
- $ref: '#/components/securitySchemes/certs'
40
42
tags:
41
- - name: ' env:test-mtls'
43
+ - name: env:test-mtls
42
44
description: This environment is meant for running internal tests through mtls
43
- - name: ' kind:remote'
45
+ - name: kind:remote
44
46
description: This server is a remote server. Not exposed by the application
45
- - name: ' visibility:private'
47
+ - name: visibility:private
46
48
description: This resource is private and only available to certain users
47
49
channels:
48
50
lightingMeasured:
49
- address: ' smartylighting.streetlights.1.0.event.{streetlightId}.lighting.measured'
51
+ address: smartylighting.streetlights.1.0.event.{streetlightId}.lighting.measured
50
52
messages:
51
53
lightMeasured:
52
54
$ref: '#/components/messages/lightMeasured'
@@ -55,23 +57,23 @@ channels:
55
57
streetlightId:
56
58
$ref: '#/components/parameters/streetlightId'
57
59
lightTurnOn:
58
- address: ' smartylighting.streetlights.1.0.action.{streetlightId}.turn.on'
60
+ address: smartylighting.streetlights.1.0.action.{streetlightId}.turn.on
59
61
messages:
60
62
turnOn:
61
63
$ref: '#/components/messages/turnOnOff'
62
64
parameters:
63
65
streetlightId:
64
66
$ref: '#/components/parameters/streetlightId'
65
67
lightTurnOff:
66
- address: ' smartylighting.streetlights.1.0.action.{streetlightId}.turn.off'
68
+ address: smartylighting.streetlights.1.0.action.{streetlightId}.turn.off
67
69
messages:
68
70
turnOff:
69
71
$ref: '#/components/messages/turnOnOff'
70
72
parameters:
71
73
streetlightId:
72
74
$ref: '#/components/parameters/streetlightId'
73
75
lightsDim:
74
- address: ' smartylighting.streetlights.1.0.action.{streetlightId}.dim'
76
+ address: smartylighting.streetlights.1.0.action.{streetlightId}.dim
75
77
messages:
76
78
dimLight:
77
79
$ref: '#/components/messages/dimLight'
@@ -89,31 +91,31 @@ operations:
89
91
traits:
90
92
- $ref: '#/components/operationTraits/kafka'
91
93
messages:
92
- - $ref: '#/components /messages/lightMeasured'
94
+ - $ref: '#/channels/lightingMeasured /messages/lightMeasured'
93
95
turnOn:
94
96
action: send
95
97
channel:
96
98
$ref: '#/channels/lightTurnOn'
97
99
traits:
98
100
- $ref: '#/components/operationTraits/kafka'
99
101
messages:
100
- - $ref: '#/components/ messages/turnOnOff '
102
+ - $ref: '#/channels/lightTurnOn/ messages/turnOn '
101
103
turnOff:
102
104
action: send
103
105
channel:
104
106
$ref: '#/channels/lightTurnOff'
105
107
traits:
106
108
- $ref: '#/components/operationTraits/kafka'
107
109
messages:
108
- - $ref: '#/components/ messages/turnOnOff '
110
+ - $ref: '#/channels/lightTurnOff/ messages/turnOff '
109
111
dimLight:
110
112
action: send
111
113
channel:
112
114
$ref: '#/channels/lightsDim'
113
115
traits:
114
116
- $ref: '#/components/operationTraits/kafka'
115
117
messages:
116
- - $ref: '#/components /messages/dimLight'
118
+ - $ref: '#/channels/lightsDim /messages/dimLight'
117
119
components:
118
120
messages:
119
121
lightMeasured:
0 commit comments