Merge pull request #2669 from matrix-org/rei/bug_type_actions

Fix spec bug concerning the type of a push rule's array of actions
pull/977/head
Travis Ralston 4 years ago committed by GitHub
commit adf9443df4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -412,9 +412,9 @@ paths:
description: |-
The action(s) to perform when the conditions for this rule are met.
items:
type: string
enum: ["notify", "dont_notify", "coalesce", "set_tweak"]
# TODO: type: object e.g. {"set_sound":"beeroclock.wav"} :/
type:
- string
- object
conditions:
type: array
description: |-
@ -592,7 +592,10 @@ paths:
description: The actions for this push rule.
examples:
application/json: {
"actions": ["notify"]
"actions": [
"notify",
{"set_tweak": "sound", "value": "bing"}
]
}
schema:
type: object
@ -601,7 +604,9 @@ paths:
type: array
description: The action(s) to perform for this rule.
items:
type: string
type:
- string
- object
required: ["actions"]
tags:
- Push notifications
@ -648,12 +653,15 @@ paths:
type: array
description: The action(s) to perform for this rule.
items:
type: string
enum: ["notify", "dont_notify", "coalesce", "set_tweak"]
# TODO: type: object e.g. {"set_sound":"beeroclock.wav"} :/
type:
- string
- object
required: ["actions"]
example: {
"actions": ["notify"]
"actions": [
"notify",
{"set_tweak": "highlight"}
]
}
responses:
200:

@ -0,0 +1 @@
Fix types of push rules' actions; they can be objects as well as strings.
Loading…
Cancel
Save