]> git.koha-community.org Git - koha.git/blob - api/v1/swagger/paths/items.json
Bug 28463: Add summary to all routes
[koha.git] / api / v1 / swagger / paths / items.json
1 {
2   "/items": {
3     "get": {
4       "x-mojo-to": "Items#list",
5       "operationId": "listItems",
6       "tags": [
7         "items"
8       ],
9       "summary": "List items",
10       "parameters": [
11         {
12           "name": "external_id",
13           "in": "query",
14           "description": "Search on the item's barcode",
15           "required": false,
16           "type": "string"
17         },
18         {
19           "$ref": "../parameters.json#/match"
20         },
21         {
22           "$ref": "../parameters.json#/order_by"
23         },
24         {
25           "$ref": "../parameters.json#/page"
26         },
27         {
28           "$ref": "../parameters.json#/per_page"
29         }
30       ],
31       "consumes": [
32         "application/json"
33       ],
34       "produces": [
35         "application/json"
36       ],
37       "responses": {
38         "200": {
39           "description": "A list of item",
40           "schema": {
41             "type": "array",
42             "items": {
43               "$ref": "../definitions.json#/item"
44             }
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         "500": {
60           "description": "Internal server error",
61           "schema": {
62             "$ref": "../definitions.json#/error"
63           }
64         },
65         "503": {
66           "description": "Under maintenance",
67           "schema": {
68             "$ref": "../definitions.json#/error"
69           }
70         }
71       },
72       "x-koha-authorization": {
73         "permissions": {
74           "catalogue": "1"
75         }
76       }
77     }
78   },
79   "/items/{item_id}": {
80     "get": {
81       "x-mojo-to": "Items#get",
82       "operationId": "getItem",
83       "tags": ["items"],
84       "summary": "Get item",
85       "parameters": [{
86           "$ref": "../parameters.json#/item_id_pp"
87         }
88       ],
89       "consumes": ["application/json"],
90       "produces": ["application/json"],
91       "responses": {
92         "200": {
93           "description": "An item",
94           "schema": {
95             "$ref": "../definitions.json#/item"
96           }
97         },
98         "400": {
99           "description": "Missing or wrong parameters",
100           "schema": {
101             "$ref": "../definitions.json#/error"
102           }
103         },
104         "404": {
105           "description": "Item not found",
106           "schema": {
107             "$ref": "../definitions.json#/error"
108           }
109         },
110         "500": {
111           "description": "Internal server error",
112           "schema": {
113             "$ref": "../definitions.json#/error"
114           }
115         },
116         "503": {
117           "description": "Under maintenance",
118           "schema": {
119             "$ref": "../definitions.json#/error"
120           }
121         }
122       },
123       "x-koha-authorization": {
124         "permissions": {
125           "catalogue": "1"
126         }
127       }
128     }
129   }
130 }