Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Responses schema fixes #3650

Merged
merged 6 commits into from
Jan 31, 2022
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelogs/client_server/newsfragments/3650.clarification
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Make empty 200 responses for puts consistent
afranke marked this conversation as resolved.
Show resolved Hide resolved
8 changes: 8 additions & 0 deletions data/api/client-server/account-data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ paths:
200:
description:
The account_data was successfully added.
examples:
application/json: {}
schema:
type: object
tags:
- User data
get:
Expand Down Expand Up @@ -151,6 +155,10 @@ paths:
200:
description:
The account_data was successfully added.
examples:
application/json: {}
schema:
type: object
tags:
- User data
get:
Expand Down
46 changes: 23 additions & 23 deletions data/api/client-server/administrative_contact.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -149,26 +149,26 @@ paths:
application/json: {
"submit_url": "https://example.org/path/to/submitToken"
}
schema:
type: object
properties:
submit_url:
type: string
format: uri
description: |-
An optional field containing a URL where the client must
submit the validation token to, with identical parameters
to the Identity Service API's `POST
/validate/email/submitToken` endpoint (without the requirement
for an access token). The homeserver must send this token to the
user (if applicable), who should then be prompted to provide it
to the client.
schema:
type: object
properties:
submit_url:
type: string
format: uri
description: |-
An optional field containing a URL where the client must
submit the validation token to, with identical parameters
to the Identity Service API's `POST
/validate/email/submitToken` endpoint (without the requirement
for an access token). The homeserver must send this token to the
user (if applicable), who should then be prompted to provide it
to the client.

If this field is not present, the client can assume that
verification will happen without the client's involvement
provided the homeserver advertises this specification version
in the `/versions` response (ie: r0.5.0).
example: "https://example.org/path/to/submitToken"
If this field is not present, the client can assume that
verification will happen without the client's involvement
provided the homeserver advertises this specification version
in the `/versions` response (ie: r0.5.0).
example: "https://example.org/path/to/submitToken"
richvdh marked this conversation as resolved.
Show resolved Hide resolved
403:
description: The credentials could not be verified with the identity server.
examples:
Expand Down Expand Up @@ -223,8 +223,8 @@ paths:
description: The addition was successful.
examples:
application/json: {}
schema:
type: object
schema:
type: object
richvdh marked this conversation as resolved.
Show resolved Hide resolved
401:
description: |-
The homeserver requires additional authentication information.
Expand Down Expand Up @@ -282,8 +282,8 @@ paths:
description: The addition was successful.
examples:
application/json: {}
schema:
type: object
schema:
type: object
richvdh marked this conversation as resolved.
Show resolved Hide resolved
429:
description: This request was rate-limited.
schema:
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 @@ -298,9 +298,10 @@ paths:
responses:
200:
description: The update succeeded.
examples:
application/json: {}
richvdh marked this conversation as resolved.
Show resolved Hide resolved
schema:
type: object
properties: {}
Comment on lines +301 to -303
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the record, I think this ends up being pretty much a no-op. An object with no properties is the same as one with an empty properties, and the auto-generated example looks the same as the one we are creating here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe, but that wouldn’t be consistent with what we have for other cases. Is there anything to change here or can we mark this resolved?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope, just calling it out explicitly for future reference. I'd leave the thread open for future viewers.

400:
description: |-
A parameter was incorrect. For example, the `algorithm` does not
Expand Down
2 changes: 2 additions & 0 deletions data/api/client-server/list_public_rooms.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ paths:
description: The visibility was updated, or no change was needed.
examples:
application/json: {}
schema:
type: object
404:
description: The room is not known to the server
examples:
Expand Down
5 changes: 3 additions & 2 deletions data/api/client-server/to_device.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ paths:
description:
The message was successfully sent.
examples:
application/json: {
}
application/json: {}
schema:
type: object
tags:
- Send-to-Device messaging