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

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

Return to bug 17006