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
This commit is contained in:
commit
adf9443df4
2 changed files with 18 additions and 9 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue