Skip to content

Commit 7a9dac7

Browse files
authored
chore: update test AsyncAPI Documents to v3 (#175)
1 parent 8eba812 commit 7a9dac7

File tree

6 files changed

+183
-102
lines changed

6 files changed

+183
-102
lines changed

tests/all.yml

Lines changed: 87 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,39 @@
1-
asyncapi: 2.0.0
2-
id: urn:zbos-mqtt-api
3-
defaultContentType: application/json
1+
asyncapi: 3.0.0
2+
id: 'urn:zbos-mqtt-api'
43
info:
54
title: ZBOS MQTT API
65
version: 2.6.3
76
description: API for communication with ZBOS by Zora Robotics.
87
contact:
98
email: info@zorarobotics.be
9+
defaultContentType: application/json
10+
servers:
11+
local:
12+
host: 127.0.0.1
13+
protocol: mqtt
14+
description: This is the local robot broker.
15+
variables:
16+
port:
17+
enum:
18+
- '1883'
19+
- '9001'
20+
default: '1883'
21+
cloud:
22+
host: zbos-mqtt.zoracloud.com
23+
protocol: mqtt
24+
description: This is the cloud broker.
25+
variables:
26+
port:
27+
enum:
28+
- '1883'
29+
- '1884'
30+
- '9001'
31+
- '9002'
1032
channels:
1133
zbos/audio/player/start:
12-
publish:
13-
summary: Play media
14-
description: |
15-
Play specific media from audio options
16-
tags:
17-
- name: Audio
18-
description: All audio related topics.
19-
message:
34+
address: zbos/audio/player/start
35+
messages:
36+
publish.message:
2037
payload:
2138
type: object
2239
properties:
@@ -29,38 +46,72 @@ channels:
2946
name: AudioOptions
3047
examples:
3148
- payload:
32-
requestId: "1"
49+
requestId: '1'
3350
url: Url
3451
loop: true
3552
zbos/audio/player/stop:
36-
publish:
37-
summary: Stop media
38-
description: ""
39-
tags:
40-
- name: Audio
41-
description: All audio related topics.
42-
message:
43-
$ref: "#/components/messages/emptyMessage"
53+
address: zbos/audio/player/stop
54+
messages:
55+
publish.message:
56+
$ref: '#/components/messages/emptyMessage'
4457
zbos/camera/picture/event:
45-
subscribe:
46-
summary: "event: Get picture"
47-
description: ""
48-
tags:
49-
- name: Camera
50-
description: All camera related topics.
51-
message:
58+
address: zbos/camera/picture/event
59+
messages:
60+
subscribe.message:
5261
payload:
5362
type: string
5463
name: String
5564
zbos/camera/picture/get:
56-
publish:
57-
summary: Get picture
58-
description: ""
59-
tags:
60-
- name: Camera
61-
description: All camera related topics.
62-
message:
63-
$ref: "#/components/messages/keyMessage"
65+
address: zbos/camera/picture/get
66+
messages:
67+
publish.message:
68+
$ref: '#/components/messages/keyMessage'
69+
operations:
70+
zbos/audio/player/start.publish:
71+
action: receive
72+
channel:
73+
$ref: '#/channels/zbos~1audio~1player~1start'
74+
summary: Play media
75+
description: |
76+
Play specific media from audio options
77+
tags:
78+
- name: Audio
79+
description: All audio related topics.
80+
messages:
81+
- $ref: '#/channels/zbos~1audio~1player~1start/messages/publish.message'
82+
zbos/audio/player/stop.publish:
83+
action: receive
84+
channel:
85+
$ref: '#/channels/zbos~1audio~1player~1stop'
86+
summary: Stop media
87+
description: ''
88+
tags:
89+
- name: Audio
90+
description: All audio related topics.
91+
messages:
92+
- $ref: '#/channels/zbos~1audio~1player~1stop/messages/publish.message'
93+
zbos/camera/picture/event.subscribe:
94+
action: send
95+
channel:
96+
$ref: '#/channels/zbos~1camera~1picture~1event'
97+
summary: 'event: Get picture'
98+
description: ''
99+
tags:
100+
- name: Camera
101+
description: All camera related topics.
102+
messages:
103+
- $ref: '#/channels/zbos~1camera~1picture~1event/messages/subscribe.message'
104+
zbos/camera/picture/get.publish:
105+
action: receive
106+
channel:
107+
$ref: '#/channels/zbos~1camera~1picture~1get'
108+
summary: Get picture
109+
description: ''
110+
tags:
111+
- name: Camera
112+
description: All camera related topics.
113+
messages:
114+
- $ref: '#/channels/zbos~1camera~1picture~1get/messages/publish.message'
64115
components:
65116
messages:
66117
emptyMessage:
@@ -80,25 +131,4 @@ components:
80131
examples:
81132
- payload:
82133
key: ABCxyz
83-
servers:
84-
local:
85-
url: 127.0.0.1
86-
protocol: mqtt
87-
description: This is the local robot broker.
88-
variables:
89-
port:
90-
enum:
91-
- "1883"
92-
- "9001"
93-
default: "1883"
94-
cloud:
95-
url: zbos-mqtt.zoracloud.com
96-
protocol: mqtt
97-
description: This is the cloud broker.
98-
variables:
99-
port:
100-
enum:
101-
- "1883"
102-
- "1884"
103-
- "9001"
104-
- "9002"
134+

tests/asyncapi.yaml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
1-
asyncapi: '2.2.0'
1+
asyncapi: 3.0.0
22
info:
33
title: Account Service
44
version: 1.0.0
55
description: This service is in charge of processing user signups
66
channels:
77
user/signedup:
8-
subscribe:
9-
message:
10-
$ref: 'tests/messages.yaml#/messages/UserSignedUp'
8+
address: user/signedup
9+
messages:
10+
subscribe.message:
11+
$ref: tests/messages.yaml#/messages/UserSignedUp
12+
operations:
13+
user/signedup.subscribe:
14+
action: send
15+
channel:
16+
$ref: '#/channels/user~1signedup'
17+
messages:
18+
- $ref: tests/messages.yaml#/messages/UserSignedUp
19+

tests/audio.yml

Lines changed: 33 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,17 @@
1-
asyncapi: 2.0.0
1+
asyncapi: 3.0.0
22
id: 'urn:zbos-mqtt-api'
3-
defaultContentType: application/json
43
info:
54
title: Audio
65
version: 2.6.3
76
description: API for communication with ZBOS by Zora Robotics.
87
contact:
98
email: info@zorarobotics.be
9+
defaultContentType: application/json
1010
channels:
1111
zbos/audio/player/start:
12-
publish:
13-
summary: Play media
14-
description: |
15-
Play specific media from audio options
16-
tags:
17-
- name: Audio
18-
description: All audio related topics.
19-
message:
12+
address: zbos/audio/player/start
13+
messages:
14+
publish.message:
2015
payload:
2116
type: object
2217
properties:
@@ -33,18 +28,39 @@ channels:
3328
url: Url
3429
loop: true
3530
zbos/audio/player/stop:
36-
publish:
37-
summary: Stop media
38-
description: ''
39-
tags:
40-
- name: Audio
41-
description: All audio related topics.
42-
message:
31+
address: zbos/audio/player/stop
32+
messages:
33+
publish.message:
4334
$ref: '#/components/messages/emptyMessage'
35+
operations:
36+
zbos/audio/player/start.publish:
37+
action: receive
38+
channel:
39+
$ref: '#/channels/zbos~1audio~1player~1start'
40+
summary: Play media
41+
description: |
42+
Play specific media from audio options
43+
tags:
44+
- name: Audio
45+
description: All audio related topics.
46+
messages:
47+
- $ref: '#/channels/zbos~1audio~1player~1start/messages/publish.message'
48+
zbos/audio/player/stop.publish:
49+
action: receive
50+
channel:
51+
$ref: '#/channels/zbos~1audio~1player~1stop'
52+
summary: Stop media
53+
description: ''
54+
tags:
55+
- name: Audio
56+
description: All audio related topics.
57+
messages:
58+
- $ref: '#/channels/zbos~1audio~1player~1stop/messages/publish.message'
4459
components:
4560
messages:
4661
emptyMessage:
4762
payload:
4863
type: object
4964
name: EmptyMessage
5065
summary: Empty message
66+

tests/base.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
asyncapi: 2.0.0
1+
asyncapi: 3.0.0
22
id: 'urn:zbos-mqtt-api'
3-
defaultContentType: 'application/json'
43
info:
54
title: ZBOS MQTT API
65
version: 2.6.3
76
description: API for communication with ZBOS by Zora Robotics.
87
contact:
98
email: info@zorarobotics.be
9+
defaultContentType: application/json
1010
servers:
1111
local:
12-
url: '127.0.0.1'
12+
host: 127.0.0.1
1313
protocol: mqtt
1414
description: This is the local robot broker.
1515
variables:
@@ -19,7 +19,7 @@ servers:
1919
- '9001'
2020
default: '1883'
2121
cloud:
22-
url: zbos-mqtt.zoracloud.com
22+
host: zbos-mqtt.zoracloud.com
2323
protocol: mqtt
2424
description: This is the cloud broker.
2525
variables:
@@ -28,4 +28,5 @@ servers:
2828
- '1883'
2929
- '1884'
3030
- '9001'
31-
- '9002'
31+
- '9002'
32+

tests/camera.yml

Lines changed: 32 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,48 @@
1-
asyncapi: 2.0.0
1+
asyncapi: 3.0.0
22
id: 'urn:zbos-mqtt-api'
3-
defaultContentType: application/json
43
info:
54
title: Camera
65
version: 2.6.3
76
description: API for communication with ZBOS by Zora Robotics.
87
contact:
98
email: info@zorarobotics.be
9+
defaultContentType: application/json
1010
channels:
1111
zbos/camera/picture/event:
12-
subscribe:
13-
summary: 'event: Get picture'
14-
description: ''
15-
tags:
16-
- name: Camera
17-
description: All camera related topics.
18-
message:
12+
address: zbos/camera/picture/event
13+
messages:
14+
subscribe.message:
1915
payload:
2016
type: string
2117
name: String
2218
zbos/camera/picture/get:
23-
publish:
24-
summary: Get picture
25-
description: ''
26-
tags:
27-
- name: Camera
28-
description: All camera related topics.
29-
message:
19+
address: zbos/camera/picture/get
20+
messages:
21+
publish.message:
3022
$ref: '#/components/messages/keyMessage'
23+
operations:
24+
zbos/camera/picture/event.subscribe:
25+
action: send
26+
channel:
27+
$ref: '#/channels/zbos~1camera~1picture~1event'
28+
summary: 'event: Get picture'
29+
description: ''
30+
tags:
31+
- name: Camera
32+
description: All camera related topics.
33+
messages:
34+
- $ref: '#/channels/zbos~1camera~1picture~1event/messages/subscribe.message'
35+
zbos/camera/picture/get.publish:
36+
action: receive
37+
channel:
38+
$ref: '#/channels/zbos~1camera~1picture~1get'
39+
summary: Get picture
40+
description: ''
41+
tags:
42+
- name: Camera
43+
description: All camera related topics.
44+
messages:
45+
- $ref: '#/channels/zbos~1camera~1picture~1get/messages/publish.message'
3146
components:
3247
messages:
3348
keyMessage:
@@ -42,3 +57,4 @@ components:
4257
examples:
4358
- payload:
4459
key: ABCxyz
60+

0 commit comments

Comments
 (0)