Line 0
Link Here
|
0 |
- |
1 |
{ |
|
|
2 |
"/patrons/{patron_id}/password": { |
3 |
"post": { |
4 |
"x-mojo-to": "Patrons::Password#set", |
5 |
"operationId": "setPatronPassword", |
6 |
"tags": [ |
7 |
"patron" |
8 |
], |
9 |
"parameters": [ |
10 |
{ |
11 |
"$ref": "../parameters.json#/patron_id_pp" |
12 |
}, |
13 |
{ |
14 |
"name": "body", |
15 |
"in": "body", |
16 |
"description": "A JSON object containing password information", |
17 |
"schema": { |
18 |
"type": "object", |
19 |
"properties": { |
20 |
"password": { |
21 |
"description": "New password (plain text)", |
22 |
"type": "string" |
23 |
}, |
24 |
"old_password": { |
25 |
"description": "Old password (plain text, only required for unprivileged patrons changing their own password)", |
26 |
"type": "string" |
27 |
} |
28 |
} |
29 |
} |
30 |
} |
31 |
], |
32 |
"produces": [ |
33 |
"application/json" |
34 |
], |
35 |
"responses": { |
36 |
"200": { |
37 |
"description": "Password changed" |
38 |
}, |
39 |
"400": { |
40 |
"description": "Bad request", |
41 |
"schema": { |
42 |
"$ref": "../definitions.json#/error" |
43 |
} |
44 |
}, |
45 |
"401": { |
46 |
"description": "Authentication required", |
47 |
"schema": { |
48 |
"$ref": "../definitions.json#/error" |
49 |
} |
50 |
}, |
51 |
"403": { |
52 |
"description": "Access forbidden", |
53 |
"schema": { |
54 |
"$ref": "../definitions.json#/error" |
55 |
} |
56 |
}, |
57 |
"404": { |
58 |
"description": "Patron not found", |
59 |
"schema": { |
60 |
"$ref": "../definitions.json#/error" |
61 |
} |
62 |
}, |
63 |
"500": { |
64 |
"description": "Internal server error", |
65 |
"schema": { |
66 |
"$ref": "../definitions.json#/error" |
67 |
} |
68 |
}, |
69 |
"503": { |
70 |
"description": "Under maintenance", |
71 |
"schema": { |
72 |
"$ref": "../definitions.json#/error" |
73 |
} |
74 |
} |
75 |
}, |
76 |
"x-koha-authorization": { |
77 |
"allow-owner": true, |
78 |
"permissions": { |
79 |
"borrowers": "1" |
80 |
} |
81 |
} |
82 |
} |
83 |
} |
84 |
} |