Skip to content

Commit c7129cf

Browse files
committed
Use maxProperties: 0 to indicate object emptiness
OpenAPI 3 ftw.
1 parent 1ce1aa6 commit c7129cf

25 files changed

+46
-11
lines changed

data/api/client-server/account-data.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ paths:
6363
application/json:
6464
schema:
6565
type: object
66+
maxProperties: 0
6667
examples:
6768
response:
6869
value: {}
@@ -230,6 +231,7 @@ paths:
230231
application/json:
231232
schema:
232233
type: object
234+
maxProperties: 0
233235
examples:
234236
response:
235237
value: {}

data/api/client-server/administrative_contact.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ paths:
233233
application/json:
234234
schema:
235235
type: object
236+
maxProperties: 0
236237
examples:
237238
response:
238239
value: {}
@@ -301,6 +302,7 @@ paths:
301302
application/json:
302303
schema:
303304
type: object
305+
maxProperties: 0
304306
examples:
305307
response:
306308
value: {}

data/api/client-server/appservice_room_directory.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ paths:
7676
application/json:
7777
schema:
7878
type: object
79+
maxProperties: 0
7980
examples:
8081
response:
8182
value: {}

data/api/client-server/banning.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ paths:
6565
application/json:
6666
schema:
6767
type: object
68+
maxProperties: 0
6869
examples:
6970
response:
7071
value: {}
@@ -135,6 +136,7 @@ paths:
135136
application/json:
136137
schema:
137138
type: object
139+
maxProperties: 0
138140
examples:
139141
response:
140142
value: {}

data/api/client-server/content-repo.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ paths:
149149
application/json:
150150
schema:
151151
type: object
152+
maxProperties: 0
152153
examples:
153154
response:
154155
value: {}

data/api/client-server/cross_signing.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ paths:
112112
application/json:
113113
schema:
114114
type: object
115+
maxProperties: 0
115116
example: {}
116117
"400":
117118
description: |-

data/api/client-server/device_management.yaml

+4-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,8 @@ paths:
124124
content:
125125
application/json:
126126
schema:
127-
type: object # empty json object
127+
type: object
128+
maxProperties: 0 # empty json object
128129
examples:
129130
response:
130131
value: {}
@@ -171,6 +172,7 @@ paths:
171172
application/json:
172173
schema:
173174
type: object
175+
maxProperties: 0
174176
examples:
175177
response:
176178
value: {}
@@ -225,6 +227,7 @@ paths:
225227
application/json:
226228
schema:
227229
type: object
230+
maxProperties: 0
228231
examples:
229232
response:
230233
value: {}

data/api/client-server/directory.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ paths:
5555
application/json:
5656
schema:
5757
type: object
58+
maxProperties: 0
5859
examples:
5960
response:
6061
value: {}
@@ -190,6 +191,7 @@ paths:
190191
application/json:
191192
schema:
192193
type: object
194+
maxProperties: 0
193195
examples:
194196
response:
195197
value: {}

data/api/client-server/inviting.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ paths:
7777
application/json:
7878
schema:
7979
type: object
80+
maxProperties: 0
8081
examples:
8182
response:
8283
value: {}

data/api/client-server/key_backup.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,7 @@ paths:
298298
application/json:
299299
schema:
300300
type: object
301+
maxProperties: 0
301302
examples:
302303
response:
303304
value: {}
@@ -366,7 +367,7 @@ paths:
366367
application/json:
367368
schema:
368369
type: object
369-
properties: {}
370+
maxProperties: 0
370371
"404":
371372
description: |-
372373
The backup specified does not exist. If the backup was previously

data/api/client-server/kicking.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ paths:
6666
application/json:
6767
schema:
6868
type: object
69+
maxProperties: 0
6970
examples:
7071
response:
7172
value: {}

data/api/client-server/leaving.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ paths:
6565
application/json:
6666
schema:
6767
type: object
68+
maxProperties: 0
6869
examples:
6970
response:
7071
value: {}
@@ -107,6 +108,7 @@ paths:
107108
application/json:
108109
schema:
109110
type: object
111+
maxProperties: 0
110112
examples:
111113
response:
112114
value: {}

data/api/client-server/list_public_rooms.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ paths:
109109
application/json:
110110
schema:
111111
type: object
112+
maxProperties: 0
112113
examples:
113114
response:
114115
value: {}

data/api/client-server/logout.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ paths:
3333
application/json:
3434
schema:
3535
type: object
36-
properties: {}
36+
maxProperties: 0
3737
tags:
3838
- Session management
3939
/logout/all:
@@ -61,7 +61,7 @@ paths:
6161
application/json:
6262
schema:
6363
type: object
64-
properties: {}
64+
maxProperties: 0
6565
tags:
6666
- Session management
6767
servers:

data/api/client-server/presence.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ paths:
6565
content:
6666
application/json:
6767
schema:
68-
type: object # empty json object
68+
type: object
69+
maxProperties: 0 # empty json object
6970
examples:
7071
response:
7172
value: {}

data/api/client-server/profile.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ paths:
5454
content:
5555
application/json:
5656
schema:
57-
type: object # empty json object
57+
type: object
58+
maxProperties: 0 # empty json object
5859
examples:
5960
response:
6061
value: {}
@@ -141,7 +142,8 @@ paths:
141142
content:
142143
application/json:
143144
schema:
144-
type: object # empty json object
145+
type: object
146+
maxProperties: 0 # empty json object
145147
examples:
146148
response:
147149
value: {}

data/api/client-server/pusher.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ paths:
250250
application/json:
251251
schema:
252252
type: object
253+
maxProperties: 0
253254
description: An empty object.
254255
examples:
255256
response:

data/api/client-server/pushrules.yaml

+6-2
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,8 @@ paths:
350350
content:
351351
application/json:
352352
schema:
353-
type: object # empty json object
353+
type: object
354+
maxProperties: 0 # empty json object
354355
examples:
355356
response:
356357
value: {}
@@ -485,7 +486,8 @@ paths:
485486
content:
486487
application/json:
487488
schema:
488-
type: object # empty json object
489+
type: object
490+
maxProperties: 0 # empty json object
489491
examples:
490492
response:
491493
value: {}
@@ -653,6 +655,7 @@ paths:
653655
application/json:
654656
schema:
655657
type: object
658+
maxProperties: 0 # empty json object
656659
examples:
657660
response:
658661
value: {}
@@ -818,6 +821,7 @@ paths:
818821
application/json:
819822
schema:
820823
type: object
824+
maxProperties: 0 # empty json object
821825
examples:
822826
response:
823827
value: {}

data/api/client-server/read_markers.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ paths:
7373
application/json:
7474
schema:
7575
type: object
76-
properties: {}
76+
maxProperties: 0 # empty json object
7777
"429":
7878
description: This request was rate-limited.
7979
content:

data/api/client-server/registration.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,7 @@ paths:
424424
application/json:
425425
schema:
426426
type: object
427+
maxProperties: 0 # empty json object
427428
examples:
428429
response:
429430
value: {}

data/api/client-server/report_content.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ paths:
7676
application/json:
7777
schema:
7878
type: object
79+
maxProperties: 0 # empty json object
7980
examples:
8081
response:
8182
value: {}

data/api/client-server/tags.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ paths:
133133
application/json:
134134
schema:
135135
type: object
136+
maxProperties: 0 # empty json object
136137
examples:
137138
response:
138139
value: {}
@@ -175,6 +176,7 @@ paths:
175176
application/json:
176177
schema:
177178
type: object
179+
maxProperties: 0 # empty json object
178180
examples:
179181
response:
180182
value: {}

data/api/client-server/third_party_membership.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ paths:
114114
application/json:
115115
schema:
116116
type: object
117+
maxProperties: 0 # empty json object
117118
examples:
118119
response:
119120
value: {}

data/api/client-server/to_device.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ paths:
7676
application/json:
7777
schema:
7878
type: object
79+
maxProperties: 0 # empty json object
7980
examples:
8081
response:
8182
value: {}

data/api/client-server/typing.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ paths:
7070
content:
7171
application/json:
7272
schema:
73-
type: object # empty json object
73+
type: object
74+
maxProperties: 0 # empty json object
7475
examples:
7576
response:
7677
value: {}

0 commit comments

Comments
 (0)