Bug 16699: Reference new x-primitives in currently defined objects
[koha.git] / api / v1 / paths / patrons.json
1 {
2   "/patrons": {
3     "get": {
4       "operationId": "listPatrons",
5       "tags": ["patrons"],
6       "produces": [
7           "application/json"
8       ],
9       "responses": {
10         "200": {
11           "description": "A list of patrons",
12           "schema": {
13             "type": "array",
14             "items": {
15               "$ref": "../definitions.json#/patron"
16             }
17           }
18         },
19         "403": {
20           "description": "Access forbidden",
21           "schema": {
22             "$ref": "../definitions.json#/error"
23           }
24         }
25       }
26     }
27   },
28   "/patrons/{borrowernumber}": {
29     "get": {
30       "operationId": "getPatron",
31       "tags": ["patrons"],
32       "parameters": [{
33           "$ref": "../parameters.json#/borrowernumberPathParam"
34         }
35       ],
36       "produces": [
37           "application/json"
38       ],
39       "responses": {
40         "200": {
41           "description": "A patron",
42           "schema": {
43             "$ref": "../definitions.json#/patron"
44           }
45         },
46         "403": {
47           "description": "Access forbidden",
48           "schema": {
49             "$ref": "../definitions.json#/error"
50           }
51         },
52         "404": {
53           "description": "Patron not found",
54           "schema": {
55             "$ref": "../definitions.json#/error"
56           }
57         }
58       }
59     }
60   }
61 }