Skip to content

Commit 2a5c18f

Browse files
committed
Use maxProperties: 0 to indicate object emptiness
OpenAPI 3 ftw.
1 parent 42d0f68 commit 2a5c18f

25 files changed

+46
-11
lines changed

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

+2
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ paths:
6464
application/json:
6565
schema:
6666
type: object
67+
maxProperties: 0
6768
examples:
6869
response:
6970
value: {}
@@ -233,6 +234,7 @@ paths:
233234
application/json:
234235
schema:
235236
type: object
237+
maxProperties: 0
236238
examples:
237239
response:
238240
value: {}

data/api/client-server/administrative_contact.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ paths:
236236
application/json:
237237
schema:
238238
type: object
239+
maxProperties: 0
239240
examples:
240241
response:
241242
value: {}
@@ -305,6 +306,7 @@ paths:
305306
application/json:
306307
schema:
307308
type: object
309+
maxProperties: 0
308310
examples:
309311
response:
310312
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
@@ -66,6 +66,7 @@ paths:
6666
application/json:
6767
schema:
6868
type: object
69+
maxProperties: 0
6970
examples:
7071
response:
7172
value: {}
@@ -137,6 +138,7 @@ paths:
137138
application/json:
138139
schema:
139140
type: object
141+
maxProperties: 0
140142
examples:
141143
response:
142144
value: {}

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

+1
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ paths:
102102
application/json:
103103
schema:
104104
type: object
105+
maxProperties: 0
105106
examples:
106107
response:
107108
value: {}

data/api/client-server/cross_signing.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ paths:
128128
application/json:
129129
schema:
130130
type: object
131+
maxProperties: 0
131132
example: {}
132133
"400":
133134
description: |-

data/api/client-server/device_management.yaml

+4-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ paths:
123123
content:
124124
application/json:
125125
schema:
126-
type: object # empty json object
126+
type: object
127+
maxProperties: 0 # empty json object
127128
examples:
128129
response:
129130
value: {}
@@ -171,6 +172,7 @@ paths:
171172
application/json:
172173
schema:
173174
type: object
175+
maxProperties: 0
174176
examples:
175177
response:
176178
value: {}
@@ -226,6 +228,7 @@ paths:
226228
application/json:
227229
schema:
228230
type: object
231+
maxProperties: 0
229232
examples:
230233
response:
231234
value: {}

data/api/client-server/directory.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ paths:
5656
application/json:
5757
schema:
5858
type: object
59+
maxProperties: 0
5960
examples:
6061
response:
6162
value: {}
@@ -192,6 +193,7 @@ paths:
192193
application/json:
193194
schema:
194195
type: object
196+
maxProperties: 0
195197
examples:
196198
response:
197199
value: {}

data/api/client-server/inviting.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ paths:
7878
application/json:
7979
schema:
8080
type: object
81+
maxProperties: 0
8182
examples:
8283
response:
8384
value: {}

data/api/client-server/key_backup.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,7 @@ paths:
302302
application/json:
303303
schema:
304304
type: object
305+
maxProperties: 0
305306
examples:
306307
response:
307308
value: {}
@@ -371,7 +372,7 @@ paths:
371372
application/json:
372373
schema:
373374
type: object
374-
properties: {}
375+
maxProperties: 0
375376
"404":
376377
description: |-
377378
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
@@ -67,6 +67,7 @@ paths:
6767
application/json:
6868
schema:
6969
type: object
70+
maxProperties: 0
7071
examples:
7172
response:
7273
value: {}

data/api/client-server/leaving.yaml

+2
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: {}
@@ -109,6 +110,7 @@ paths:
109110
application/json:
110111
schema:
111112
type: object
113+
maxProperties: 0
112114
examples:
113115
response:
114116
value: {}

data/api/client-server/list_public_rooms.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ paths:
110110
application/json:
111111
schema:
112112
type: object
113+
maxProperties: 0
113114
examples:
114115
response:
115116
value: {}

data/api/client-server/logout.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ paths:
3434
application/json:
3535
schema:
3636
type: object
37-
properties: {}
37+
maxProperties: 0
3838
tags:
3939
- Session management
4040
/logout/all:
@@ -63,7 +63,7 @@ paths:
6363
application/json:
6464
schema:
6565
type: object
66-
properties: {}
66+
maxProperties: 0
6767
tags:
6868
- Session management
6969
servers:

data/api/client-server/presence.yaml

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

data/api/client-server/profile.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ paths:
5555
content:
5656
application/json:
5757
schema:
58-
type: object # empty json object
58+
type: object
59+
maxProperties: 0 # empty json object
5960
examples:
6061
response:
6162
value: {}
@@ -143,7 +144,8 @@ paths:
143144
content:
144145
application/json:
145146
schema:
146-
type: object # empty json object
147+
type: object
148+
maxProperties: 0 # empty json object
147149
examples:
148150
response:
149151
value: {}

data/api/client-server/pusher.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ paths:
252252
application/json:
253253
schema:
254254
type: object
255+
maxProperties: 0
255256
description: An empty object.
256257
examples:
257258
response:

data/api/client-server/pushrules.yaml

+6-2
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,8 @@ paths:
353353
content:
354354
application/json:
355355
schema:
356-
type: object # empty json object
356+
type: object
357+
maxProperties: 0 # empty json object
357358
examples:
358359
response:
359360
value: {}
@@ -487,7 +488,8 @@ paths:
487488
content:
488489
application/json:
489490
schema:
490-
type: object # empty json object
491+
type: object
492+
maxProperties: 0 # empty json object
491493
examples:
492494
response:
493495
value: {}
@@ -657,6 +659,7 @@ paths:
657659
application/json:
658660
schema:
659661
type: object
662+
maxProperties: 0 # empty json object
660663
examples:
661664
response:
662665
value: {}
@@ -824,6 +827,7 @@ paths:
824827
application/json:
825828
schema:
826829
type: object
830+
maxProperties: 0 # empty json object
827831
examples:
828832
response:
829833
value: {}

data/api/client-server/read_markers.yaml

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

data/api/client-server/registration.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,7 @@ paths:
426426
application/json:
427427
schema:
428428
type: object
429+
maxProperties: 0 # empty json object
429430
examples:
430431
response:
431432
value: {}

data/api/client-server/report_content.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 # empty json object
8081
examples:
8182
response:
8283
value: {}

data/api/client-server/tags.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ paths:
115115
application/json:
116116
schema:
117117
type: object
118+
maxProperties: 0 # empty json object
118119
examples:
119120
response:
120121
value: {}
@@ -158,6 +159,7 @@ paths:
158159
application/json:
159160
schema:
160161
type: object
162+
maxProperties: 0 # empty json object
161163
examples:
162164
response:
163165
value: {}

data/api/client-server/third_party_membership.yaml

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

data/api/client-server/to_device.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ paths:
7979
application/json:
8080
schema:
8181
type: object
82+
maxProperties: 0 # empty json object
8283
examples:
8384
response:
8485
value: {}

data/api/client-server/typing.yaml

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

0 commit comments

Comments
 (0)