aboutsummaryrefslogtreecommitdiff
path: root/docs/api/schemas/patchwork.j2
diff options
context:
space:
mode:
authorStephen Finucane <stephen@that.guru>2019-11-30 18:48:36 +0000
committerStephen Finucane <stephen@that.guru>2019-12-24 11:15:21 +0000
commitcd3a2ce81ae4595fceb82edd43488f6f2422371e (patch)
tree372bcdb29cf5f70dcfd9a096ac57abac450fca61 /docs/api/schemas/patchwork.j2
parentcedfaa9e0b449a939a107794cdb2e61d323cc925 (diff)
downloadpatchwork-cd3a2ce81ae4595fceb82edd43488f6f2422371e.tar
patchwork-cd3a2ce81ae4595fceb82edd43488f6f2422371e.tar.gz
REST: Allow configuration of user settings via API
Expose the embedded UserProfile field via the REST API. Signed-off-by: Stephen Finucane <stephen@that.guru>
Diffstat (limited to 'docs/api/schemas/patchwork.j2')
-rw-r--r--docs/api/schemas/patchwork.j253
1 files changed, 53 insertions, 0 deletions
diff --git a/docs/api/schemas/patchwork.j2 b/docs/api/schemas/patchwork.j2
index 196d784..c2f5ea6 100644
--- a/docs/api/schemas/patchwork.j2
+++ b/docs/api/schemas/patchwork.j2
@@ -1101,7 +1101,11 @@ paths:
content:
application/json:
schema:
+{% if version >= (1, 2) %}
+ $ref: '#/components/schemas/UserDetail'
+{% else %}
$ref: '#/components/schemas/User'
+{% endif %}
'403':
description: Forbidden
content:
@@ -1138,7 +1142,11 @@ paths:
content:
application/json:
schema:
+{% if version >= (1, 2) %}
+ $ref: '#/components/schemas/UserDetail'
+{% else %}
$ref: '#/components/schemas/User'
+{% endif %}
'400':
description: Bad request
content:
@@ -1181,7 +1189,11 @@ paths:
content:
application/json:
schema:
+{% if version >= (1, 2) %}
+ $ref: '#/components/schemas/UserDetail'
+{% else %}
$ref: '#/components/schemas/User'
+{% endif %}
'400':
description: Bad request
content:
@@ -1318,13 +1330,25 @@ components:
content:
application/json:
schema:
+{% if version >= (1, 2) %}
+ $ref: '#/components/schemas/UserDetail'
+{% else %}
$ref: '#/components/schemas/User'
+{% endif %}
multipart/form-data:
schema:
+{% if version >= (1, 2) %}
+ $ref: '#/components/schemas/UserDetail'
+{% else %}
$ref: '#/components/schemas/User'
+{% endif %}
application/x-www-form-urlencoded:
schema:
+{% if version >= (1, 2) %}
+ $ref: '#/components/schemas/UserDetail'
+{% else %}
$ref: '#/components/schemas/User'
+{% endif %}
schemas:
Index:
type: object
@@ -2209,6 +2233,35 @@ components:
format: email
readOnly: true
minLength: 1
+{% if version >= (1, 2) %}
+ UserDetail:
+ type: object
+ allOf:
+ - $ref: '#/components/schemas/User'
+ - type: object
+ properties:
+ settings:
+ type: object
+ properties:
+ send_email:
+ title: Send email
+ description: >
+ Whether Patchwork should send email on your behalf.
+ Only present and configurable for your account.
+ type: boolean
+ items_per_page:
+ title: Items per page
+ description: >
+ Number of items to display per page (web UI).
+ Only present and configurable for your account.
+ type: integer
+ show_ids:
+ title: Show IDs
+ description:
+ Show click-to-copy IDs in the list view (web UI).
+ Only present and configurable for your account.
+ type: boolean
+{% endif %}
CheckEmbedded:
type: object
properties: