Clarify what fields are required when deleting a pusher (#1321)

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
This commit is contained in:
Kévin Commaille 2022-11-22 18:12:13 +01:00 committed by GitHub
parent 84fbb611db
commit 8d4a3bb912
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 12 deletions

View file

@ -0,0 +1 @@
Clarify what fields are required when deleting a pusher

View file

@ -139,6 +139,11 @@ paths:
This endpoint allows the creation, modification and deletion of [pushers](/client-server-api/#push-notifications) This endpoint allows the creation, modification and deletion of [pushers](/client-server-api/#push-notifications)
for this user ID. The behaviour of this endpoint varies depending on the for this user ID. The behaviour of this endpoint varies depending on the
values in the JSON body. values in the JSON body.
If `kind` is not `null`, the pusher with this `app_id` and `pushkey`
for this user is updated, or it is created if it doesn't exist. If
`kind` is `null`, the pusher with this `app_id` and `pushkey` for this
user is deleted.
operationId: postPusher operationId: postPusher
security: security:
- accessToken: [] - accessToken: []
@ -177,7 +182,9 @@ paths:
If the `kind` is `"email"`, this is the email address to If the `kind` is `"email"`, this is the email address to
send notifications to. send notifications to.
kind: kind:
type: string type:
- "string"
- "null"
description: |- description: |-
The kind of pusher to configure. `"http"` makes a pusher that The kind of pusher to configure. `"http"` makes a pusher that
sends HTTP pokes. `"email"` makes a pusher that emails the sends HTTP pokes. `"email"` makes a pusher that emails the
@ -194,13 +201,13 @@ paths:
app_display_name: app_display_name:
type: string type: string
description: |- description: |-
A string that will allow the user to identify what application Required if `kind` is not `null`. A string that will allow the
owns this pusher. user to identify what application owns this pusher.
device_display_name: device_display_name:
type: string type: string
description: |- description: |-
A string that will allow the user to identify what device owns Required if `kind` is not `null`. A string that will allow the
this pusher. user to identify what device owns this pusher.
profile_tag: profile_tag:
type: string type: string
description: |- description: |-
@ -209,14 +216,15 @@ paths:
lang: lang:
type: string type: string
description: |- description: |-
The preferred language for receiving notifications (e.g. 'en' Required if `kind` is not `null`. The preferred language for
or 'en-US'). receiving notifications (e.g. 'en' or 'en-US').
data: data:
type: object type: object
description: |- description: |-
A dictionary of information for the pusher implementation Required if `kind` is not `null`. A dictionary of information
itself. If `kind` is `http`, this should contain `url` for the pusher implementation itself. If `kind` is `http`,
which is the URL to use to send notifications to. this should contain `url` which is the URL to use to send
notifications to.
title: PusherData title: PusherData
properties: properties:
url: url:
@ -243,8 +251,7 @@ paths:
different user IDs. Otherwise, the homeserver must remove any different user IDs. Otherwise, the homeserver must remove any
other pushers with the same App ID and pushkey for different other pushers with the same App ID and pushkey for different
users. The default is `false`. users. The default is `false`.
required: ['kind', 'app_id', 'app_display_name', required: ['kind', 'app_id', 'pushkey']
'device_display_name', 'pushkey', 'lang', 'data']
responses: responses:
200: 200:
description: The pusher was set. description: The pusher was set.