Bug 15126: x-mojo-controller deprecation
[koha.git] / api / v1 / swagger.json
blobe821c442a26fa2e8449b6c93e5c556a18150bdb7
2   "swagger": "2.0",
3   "info": {
4     "title": "Koha REST API",
5     "version": "1",
6     "license": {
7       "name": "GPL v3",
8       "url": "http://www.gnu.org/licenses/gpl.txt"
9     },
10     "contact": {
11       "name": "Koha Team",
12       "url": "http://koha-community.org/"
13     }
14   },
15   "basePath": "/api/v1",
16   "paths": {
17     "/patrons": {
18       "get": {
19         "operationId": "listPatrons",
20         "tags": ["patrons"],
21         "produces": [
22           "application/json"
23         ],
24         "responses": {
25           "200": {
26             "description": "A list of patrons",
27             "schema": {
28               "type": "array",
29               "items": {
30                 "$ref": "#/definitions/patron"
31               }
32             }
33           },
34           "403": {
35             "description": "Access forbidden",
36             "schema": {
37               "$ref": "#/definitions/error"
38             }
39           }
40         }
41       }
42     },
43     "/patrons/{borrowernumber}": {
44       "get": {
45         "operationId": "getPatron",
46         "tags": ["patrons"],
47         "parameters": [
48           {
49             "$ref": "#/parameters/borrowernumberPathParam"
50           }
51         ],
52         "produces": [
53           "application/json"
54         ],
55         "responses": {
56           "200": {
57             "description": "A patron",
58             "schema": {
59               "$ref": "#/definitions/patron"
60             }
61           },
62           "403": {
63             "description": "Access forbidden",
64             "schema": {
65               "$ref": "#/definitions/error"
66             }
67           },
68           "404": {
69             "description": "Patron not found",
70             "schema": {
71               "$ref": "#/definitions/error"
72             }
73           }
74         }
75       }
76     }
77   },
78   "definitions": {
79     "$ref": "./definitions/index.json"
80   },
81   "parameters": {
82     "borrowernumberPathParam": {
83       "name": "borrowernumber",
84       "in": "path",
85       "description": "Internal patron identifier",
86       "required": true,
87       "type": "integer"
88     }
89   }