Bug 28370: Add missing additionalProperties in spec
[koha.git] / api / v1 / swagger / paths / patrons_password.json
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               "password_2": {
25                 "description": "Repeated new password (plain text)",
26                 "type": "string"
27               }
28             },
29             "required": ["password", "password_2"],
30             "additionalProperties": false
31           }
32         }
33       ],
34       "produces": [
35         "application/json"
36       ],
37       "responses": {
38         "200": {
39           "description": "Password changed"
40         },
41         "400": {
42           "description": "Bad request",
43           "schema": {
44             "$ref": "../definitions.json#/error"
45           }
46         },
47         "401": {
48           "description": "Authentication required",
49           "schema": {
50             "$ref": "../definitions.json#/error"
51           }
52         },
53         "403": {
54           "description": "Access forbidden",
55           "schema": {
56             "$ref": "../definitions.json#/error"
57           }
58         },
59         "404": {
60           "description": "Patron not found",
61           "schema": {
62             "$ref": "../definitions.json#/error"
63           }
64         },
65         "500": {
66           "description": "Internal server error",
67           "schema": {
68             "$ref": "../definitions.json#/error"
69           }
70         },
71         "503": {
72           "description": "Under maintenance",
73           "schema": {
74             "$ref": "../definitions.json#/error"
75           }
76         }
77       },
78       "x-koha-authorization": {
79         "permissions": {
80           "borrowers": "1"
81         }
82       }
83     }
84   }
85 }