View | Details | Raw Unified | Return to bug 17006
Collapse All | Expand All

(-)a/api/v1/swagger/paths.json (+3 lines)
Lines 29-34 Link Here
29
  "/patrons/{patron_id}/account": {
29
  "/patrons/{patron_id}/account": {
30
    "$ref": "paths/patrons_account.json#/~1patrons~1{patron_id}~1account"
30
    "$ref": "paths/patrons_account.json#/~1patrons~1{patron_id}~1account"
31
  },
31
  },
32
  "/patrons/{patron_id}/password": {
33
    "$ref": "paths/patrons_password.json#/~1patrons~1{patron_id}~1password"
34
  },
32
  "/illrequests": {
35
  "/illrequests": {
33
    "$ref": "paths/illrequests.json#/~1illrequests"
36
    "$ref": "paths/illrequests.json#/~1illrequests"
34
  }
37
  }
(-)a/api/v1/swagger/paths/patrons_password.json (-1 / +84 lines)
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
}

Return to bug 17006