Skip to content

Commit

Permalink
Use maxProperties: 0 to indicate object emptiness
Browse files Browse the repository at this point in the history
OpenAPI 3 ftw.
  • Loading branch information
KitsuneRal committed Sep 20, 2024
1 parent 555e399 commit 6202b65
Show file tree
Hide file tree
Showing 25 changed files with 46 additions and 11 deletions.
2 changes: 2 additions & 0 deletions data/api/client-server/account-data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ paths:
application/json:
schema:
type: object
maxProperties: 0
examples:
response:
value: {}
Expand Down Expand Up @@ -233,6 +234,7 @@ paths:
application/json:
schema:
type: object
maxProperties: 0
examples:
response:
value: {}
Expand Down
2 changes: 2 additions & 0 deletions data/api/client-server/administrative_contact.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ paths:
application/json:
schema:
type: object
maxProperties: 0
examples:
response:
value: {}
Expand Down Expand Up @@ -305,6 +306,7 @@ paths:
application/json:
schema:
type: object
maxProperties: 0
examples:
response:
value: {}
Expand Down
1 change: 1 addition & 0 deletions data/api/client-server/appservice_room_directory.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ paths:
application/json:
schema:
type: object
maxProperties: 0
examples:
response:
value: {}
Expand Down
2 changes: 2 additions & 0 deletions data/api/client-server/banning.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ paths:
application/json:
schema:
type: object
maxProperties: 0
examples:
response:
value: {}
Expand Down Expand Up @@ -137,6 +138,7 @@ paths:
application/json:
schema:
type: object
maxProperties: 0
examples:
response:
value: {}
Expand Down
1 change: 1 addition & 0 deletions data/api/client-server/content-repo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ paths:
application/json:
schema:
type: object
maxProperties: 0
examples:
response:
value: {}
Expand Down
1 change: 1 addition & 0 deletions data/api/client-server/cross_signing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ paths:
application/json:
schema:
type: object
maxProperties: 0
example: {}
"400":
description: |-
Expand Down
5 changes: 4 additions & 1 deletion data/api/client-server/device_management.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ paths:
content:
application/json:
schema:
type: object # empty json object
type: object
maxProperties: 0 # empty json object
examples:
response:
value: {}
Expand Down Expand Up @@ -171,6 +172,7 @@ paths:
application/json:
schema:
type: object
maxProperties: 0
examples:
response:
value: {}
Expand Down Expand Up @@ -226,6 +228,7 @@ paths:
application/json:
schema:
type: object
maxProperties: 0
examples:
response:
value: {}
Expand Down
2 changes: 2 additions & 0 deletions data/api/client-server/directory.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ paths:
application/json:
schema:
type: object
maxProperties: 0
examples:
response:
value: {}
Expand Down Expand Up @@ -192,6 +193,7 @@ paths:
application/json:
schema:
type: object
maxProperties: 0
examples:
response:
value: {}
Expand Down
1 change: 1 addition & 0 deletions data/api/client-server/inviting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ paths:
application/json:
schema:
type: object
maxProperties: 0
examples:
response:
value: {}
Expand Down
3 changes: 2 additions & 1 deletion data/api/client-server/key_backup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ paths:
application/json:
schema:
type: object
maxProperties: 0
examples:
response:
value: {}
Expand Down Expand Up @@ -371,7 +372,7 @@ paths:
application/json:
schema:
type: object
properties: {}
maxProperties: 0
"404":
description: |-
The backup specified does not exist. If the backup was previously
Expand Down
1 change: 1 addition & 0 deletions data/api/client-server/kicking.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ paths:
application/json:
schema:
type: object
maxProperties: 0
examples:
response:
value: {}
Expand Down
2 changes: 2 additions & 0 deletions data/api/client-server/leaving.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ paths:
application/json:
schema:
type: object
maxProperties: 0
examples:
response:
value: {}
Expand Down Expand Up @@ -109,6 +110,7 @@ paths:
application/json:
schema:
type: object
maxProperties: 0
examples:
response:
value: {}
Expand Down
1 change: 1 addition & 0 deletions data/api/client-server/list_public_rooms.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ paths:
application/json:
schema:
type: object
maxProperties: 0
examples:
response:
value: {}
Expand Down
4 changes: 2 additions & 2 deletions data/api/client-server/logout.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ paths:
application/json:
schema:
type: object
properties: {}
maxProperties: 0
tags:
- Session management
/logout/all:
Expand Down Expand Up @@ -63,7 +63,7 @@ paths:
application/json:
schema:
type: object
properties: {}
maxProperties: 0
tags:
- Session management
servers:
Expand Down
3 changes: 2 additions & 1 deletion data/api/client-server/presence.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ paths:
content:
application/json:
schema:
type: object # empty json object
type: object
maxProperties: 0 # empty json object
examples:
response:
value: {}
Expand Down
6 changes: 4 additions & 2 deletions data/api/client-server/profile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ paths:
content:
application/json:
schema:
type: object # empty json object
type: object
maxProperties: 0 # empty json object
examples:
response:
value: {}
Expand Down Expand Up @@ -143,7 +144,8 @@ paths:
content:
application/json:
schema:
type: object # empty json object
type: object
maxProperties: 0 # empty json object
examples:
response:
value: {}
Expand Down
1 change: 1 addition & 0 deletions data/api/client-server/pusher.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ paths:
application/json:
schema:
type: object
maxProperties: 0
description: An empty object.
examples:
response:
Expand Down
8 changes: 6 additions & 2 deletions data/api/client-server/pushrules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ paths:
content:
application/json:
schema:
type: object # empty json object
type: object
maxProperties: 0 # empty json object
examples:
response:
value: {}
Expand Down Expand Up @@ -291,7 +292,8 @@ paths:
content:
application/json:
schema:
type: object # empty json object
type: object
maxProperties: 0 # empty json object
examples:
response:
value: {}
Expand Down Expand Up @@ -445,6 +447,7 @@ paths:
application/json:
schema:
type: object
maxProperties: 0 # empty json object
examples:
response:
value: {}
Expand Down Expand Up @@ -596,6 +599,7 @@ paths:
application/json:
schema:
type: object
maxProperties: 0 # empty json object
examples:
response:
value: {}
Expand Down
2 changes: 1 addition & 1 deletion data/api/client-server/read_markers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ paths:
application/json:
schema:
type: object
properties: {}
maxProperties: 0 # empty json object
"429":
description: This request was rate-limited.
content:
Expand Down
1 change: 1 addition & 0 deletions data/api/client-server/registration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,7 @@ paths:
application/json:
schema:
type: object
maxProperties: 0 # empty json object
examples:
response:
value: {}
Expand Down
1 change: 1 addition & 0 deletions data/api/client-server/report_content.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ paths:
application/json:
schema:
type: object
maxProperties: 0 # empty json object
examples:
response:
value: {}
Expand Down
2 changes: 2 additions & 0 deletions data/api/client-server/tags.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ paths:
application/json:
schema:
type: object
maxProperties: 0 # empty json object
examples:
response:
value: {}
Expand Down Expand Up @@ -158,6 +159,7 @@ paths:
application/json:
schema:
type: object
maxProperties: 0 # empty json object
examples:
response:
value: {}
Expand Down
1 change: 1 addition & 0 deletions data/api/client-server/third_party_membership.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ paths:
application/json:
schema:
type: object
maxProperties: 0 # empty json object
examples:
response:
value: {}
Expand Down
1 change: 1 addition & 0 deletions data/api/client-server/to_device.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ paths:
application/json:
schema:
type: object
maxProperties: 0 # empty json object
examples:
response:
value: {}
Expand Down
3 changes: 2 additions & 1 deletion data/api/client-server/typing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ paths:
content:
application/json:
schema:
type: object # empty json object
type: object
maxProperties: 0 # empty json object
examples:
response:
value: {}
Expand Down

0 comments on commit 6202b65

Please sign in to comment.