@@ -113,26 +113,7 @@ describe('[integration testing] bundler should ', () => {
113113 'smartylighting/streetlights/1/0/action/{streetlightId}/turn/on' ,
114114 messages : {
115115 turnOn : {
116- name : 'turnOnOff' ,
117- title : 'Turn on/off' ,
118- summary :
119- 'Command a particular streetlight to turn the lights on or off.' ,
120- payload : {
121- $schema : 'https://json-schema.org/draft/2020-12/schema' ,
122- type : 'object' ,
123- properties : {
124- command : {
125- type : 'string' ,
126- enum : [ 'on' , 'off' ] ,
127- description : 'Whether to turn on or off the light.' ,
128- } ,
129- sentAt : {
130- type : 'string' ,
131- format : 'date-time' ,
132- description : 'Date and time when the message was sent.' ,
133- } ,
134- } ,
135- } ,
116+ $ref : '#/components/messages/turnOnOff' ,
136117 } ,
137118 } ,
138119 } ,
@@ -141,26 +122,7 @@ describe('[integration testing] bundler should ', () => {
141122 'smartylighting/streetlights/1/0/action/{streetlightId}/turn/off' ,
142123 messages : {
143124 turnOff : {
144- name : 'turnOnOff' ,
145- title : 'Turn on/off' ,
146- summary :
147- 'Command a particular streetlight to turn the lights on or off.' ,
148- payload : {
149- $schema : 'https://json-schema.org/draft/2020-12/schema' ,
150- type : 'object' ,
151- properties : {
152- command : {
153- type : 'string' ,
154- enum : [ 'on' , 'off' ] ,
155- description : 'Whether to turn on or off the light.' ,
156- } ,
157- sentAt : {
158- type : 'string' ,
159- format : 'date-time' ,
160- description : 'Date and time when the message was sent.' ,
161- } ,
162- } ,
163- } ,
125+ $ref : '#/components/messages/turnOnOff' ,
164126 } ,
165127 } ,
166128 } ,
@@ -169,27 +131,7 @@ describe('[integration testing] bundler should ', () => {
169131 'smartylighting/streetlights/1/0/event/{streetlightId}/lighting/measured' ,
170132 messages : {
171133 lightMeasured : {
172- name : 'lightMeasured' ,
173- title : 'Light measured' ,
174- summary :
175- 'Inform about environmental lighting conditions of a particular streetlight.' ,
176- contentType : 'application/json' ,
177- payload : {
178- $schema : 'https://json-schema.org/draft/2020-12/schema' ,
179- type : 'object' ,
180- properties : {
181- lumens : {
182- type : 'integer' ,
183- minimum : 0 ,
184- description : 'Light intensity measured in lumens.' ,
185- } ,
186- sentAt : {
187- type : 'string' ,
188- format : 'date-time' ,
189- description : 'Date and time when the message was sent.' ,
190- } ,
191- } ,
192- } ,
134+ $ref : '#/components/messages/lightMeasured' ,
193135 } ,
194136 } ,
195137 description :
0 commit comments