Fix spec bug concerning the type of a push rule's array of actions
Signed-off-by: Olivier Wilkinson (reivilibre) <olivier@librepush.net>
This commit is contained in:
parent
f8ff2ad6a9
commit
2e72da2343
2 changed files with 18 additions and 9 deletions
|
@ -412,9 +412,9 @@ paths:
|
||||||
description: |-
|
description: |-
|
||||||
The action(s) to perform when the conditions for this rule are met.
|
The action(s) to perform when the conditions for this rule are met.
|
||||||
items:
|
items:
|
||||||
type: string
|
type:
|
||||||
enum: ["notify", "dont_notify", "coalesce", "set_tweak"]
|
- string
|
||||||
# TODO: type: object e.g. {"set_sound":"beeroclock.wav"} :/
|
- object
|
||||||
conditions:
|
conditions:
|
||||||
type: array
|
type: array
|
||||||
description: |-
|
description: |-
|
||||||
|
@ -592,7 +592,10 @@ paths:
|
||||||
description: The actions for this push rule.
|
description: The actions for this push rule.
|
||||||
examples:
|
examples:
|
||||||
application/json: {
|
application/json: {
|
||||||
"actions": ["notify"]
|
"actions": [
|
||||||
|
"notify",
|
||||||
|
{"set_tweak": "sound", "value": "bing"}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
schema:
|
schema:
|
||||||
type: object
|
type: object
|
||||||
|
@ -601,7 +604,9 @@ paths:
|
||||||
type: array
|
type: array
|
||||||
description: The action(s) to perform for this rule.
|
description: The action(s) to perform for this rule.
|
||||||
items:
|
items:
|
||||||
type: string
|
type:
|
||||||
|
- string
|
||||||
|
- object
|
||||||
required: ["actions"]
|
required: ["actions"]
|
||||||
tags:
|
tags:
|
||||||
- Push notifications
|
- Push notifications
|
||||||
|
@ -648,12 +653,15 @@ paths:
|
||||||
type: array
|
type: array
|
||||||
description: The action(s) to perform for this rule.
|
description: The action(s) to perform for this rule.
|
||||||
items:
|
items:
|
||||||
type: string
|
type:
|
||||||
enum: ["notify", "dont_notify", "coalesce", "set_tweak"]
|
- string
|
||||||
# TODO: type: object e.g. {"set_sound":"beeroclock.wav"} :/
|
- object
|
||||||
required: ["actions"]
|
required: ["actions"]
|
||||||
example: {
|
example: {
|
||||||
"actions": ["notify"]
|
"actions": [
|
||||||
|
"notify",
|
||||||
|
{"set_tweak": "highlight"}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
responses:
|
responses:
|
||||||
200:
|
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