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

(-)a/api/v1/swagger/paths.json (-3 / +3 lines)
Lines 81-93 Link Here
81
    "$ref": "paths/libraries.json#/~1libraries"
81
    "$ref": "paths/libraries.json#/~1libraries"
82
  },
82
  },
83
  "/transfer_limits": {
83
  "/transfer_limits": {
84
    "$ref": "paths/transfer_limits.json#/~1transfer_limits"
84
    "$ref": "paths/transfer_limits.yaml#/~1transfer_limits"
85
  },
85
  },
86
  "/transfer_limits/{limit_id}": {
86
  "/transfer_limits/{limit_id}": {
87
    "$ref": "paths/transfer_limits.json#/~1transfer_limits~1{limit_id}"
87
    "$ref": "paths/transfer_limits.yaml#/~1transfer_limits~1{limit_id}"
88
  },
88
  },
89
  "/transfer_limits/batch": {
89
  "/transfer_limits/batch": {
90
    "$ref": "paths/transfer_limits.json#/~1transfer_limits~1batch"
90
    "$ref": "paths/transfer_limits.yaml#/~1transfer_limits~1batch"
91
  },
91
  },
92
  "/libraries/{library_id}": {
92
  "/libraries/{library_id}": {
93
    "$ref": "paths/libraries.json#/~1libraries~1{library_id}"
93
    "$ref": "paths/libraries.json#/~1libraries~1{library_id}"
(-)a/api/v1/swagger/paths/transfer_limits.json (-376 lines)
Lines 1-376 Link Here
1
{
2
  "/transfer_limits": {
3
    "get": {
4
      "x-mojo-to": "TransferLimits#list",
5
      "operationId": "listTransferLimits",
6
      "tags": [
7
        "transfer"
8
      ],
9
      "parameters": [
10
        {
11
          "name": "to_library_id",
12
          "in": "query",
13
          "description": "Search on to_library_id",
14
          "required": false,
15
          "type": "string"
16
        },
17
        {
18
          "name": "from_library_id",
19
          "in": "query",
20
          "description": "Search on from_library_id",
21
          "required": false,
22
          "type": "string"
23
        },
24
        {
25
          "name": "item_type",
26
          "in": "query",
27
          "description": "Search on item_type",
28
          "required": false,
29
          "type": "string"
30
        },
31
        {
32
          "name": "collection_code",
33
          "in": "query",
34
          "description": "Search on collection_code",
35
          "required": false,
36
          "type": "string"
37
        },
38
        {
39
          "$ref": "../parameters.json#/match"
40
        },
41
        {
42
          "$ref": "../parameters.json#/order_by"
43
        },
44
        {
45
          "$ref": "../parameters.json#/page"
46
        },
47
        {
48
          "$ref": "../parameters.json#/per_page"
49
        },
50
        {
51
          "$ref": "../parameters.json#/q_param"
52
        },
53
        {
54
          "$ref": "../parameters.json#/q_body"
55
        },
56
        {
57
          "$ref": "../parameters.json#/q_header"
58
        }
59
      ],
60
      "produces": [
61
        "application/json"
62
      ],
63
      "responses": {
64
        "200": {
65
          "description": "A list of transfer limits",
66
          "schema": {
67
            "type": "array",
68
            "items": {
69
              "$ref": "../definitions.json#/transfer_limit"
70
            }
71
          }
72
        },
73
        "500": {
74
          "description": "Internal error",
75
          "schema": {
76
            "$ref": "../definitions.json#/error"
77
          }
78
        },
79
        "503": {
80
          "description": "Under maintenance",
81
          "schema": {
82
            "$ref": "../definitions.json#/error"
83
          }
84
        }
85
      },
86
      "x-koha-authorization": {
87
        "permissions": {
88
          "parameters": "manage_transfers"
89
        }
90
      }
91
    },
92
    "post": {
93
      "x-mojo-to": "TransferLimits#add",
94
      "operationId": "addTransferLimit",
95
      "tags": [
96
        "transfer"
97
      ],
98
      "parameters": [
99
        {
100
          "name": "body",
101
          "in": "body",
102
          "description": "A JSON object containing information about a new transfer limit",
103
          "required": true,
104
          "schema": {
105
            "$ref": "../definitions.json#/transfer_limit"
106
          }
107
        }
108
      ],
109
      "produces": [
110
        "application/json"
111
      ],
112
      "responses": {
113
        "201": {
114
          "description": "Transfer limit added",
115
          "schema": {
116
            "$ref": "../definitions.json#/transfer_limit"
117
          }
118
        },
119
        "400": {
120
          "description": "Bad request",
121
          "schema": {
122
            "$ref": "../definitions.json#/error"
123
          }
124
        },
125
        "401": {
126
          "description": "Authentication required",
127
          "schema": {
128
            "$ref": "../definitions.json#/error"
129
          }
130
        },
131
        "403": {
132
          "description": "Access forbidden",
133
          "schema": {
134
            "$ref": "../definitions.json#/error"
135
          }
136
        },
137
        "409": {
138
          "description": "Conflict in creating resource",
139
          "schema": {
140
            "$ref": "../definitions.json#/error"
141
          }
142
        },
143
        "500": {
144
          "description": "Internal error",
145
          "schema": {
146
            "$ref": "../definitions.json#/error"
147
          }
148
        },
149
        "503": {
150
          "description": "Under maintenance",
151
          "schema": {
152
            "$ref": "../definitions.json#/error"
153
          }
154
        }
155
      },
156
      "x-koha-authorization": {
157
        "permissions": {
158
          "parameters": "manage_transfers"
159
        }
160
      }
161
    }
162
  },
163
  "/transfer_limits/{limit_id}": {
164
    "delete": {
165
      "x-mojo-to": "TransferLimits#delete",
166
      "operationId": "deleteTransferLimit",
167
      "tags": [
168
        "transfer"
169
      ],
170
      "parameters": [
171
        {
172
          "$ref": "../parameters.json#/transfer_limit_id_pp"
173
        }
174
      ],
175
      "produces": [
176
        "application/json"
177
      ],
178
      "responses": {
179
        "204": {
180
          "description": "Transfer limit deleted",
181
          "schema": {
182
            "type": "string"
183
          }
184
        },
185
        "401": {
186
          "description": "Authentication required",
187
          "schema": {
188
            "$ref": "../definitions.json#/error"
189
          }
190
        },
191
        "403": {
192
          "description": "Access forbidden",
193
          "schema": {
194
            "$ref": "../definitions.json#/error"
195
          }
196
        },
197
        "404": {
198
          "description": "Library not found",
199
          "schema": {
200
            "$ref": "../definitions.json#/error"
201
          }
202
        },
203
        "500": {
204
          "description": "Internal error",
205
          "schema": {
206
            "$ref": "../definitions.json#/error"
207
          }
208
        },
209
        "503": {
210
          "description": "Under maintenance",
211
          "schema": {
212
            "$ref": "../definitions.json#/error"
213
          }
214
        }
215
      },
216
      "x-koha-authorization": {
217
        "permissions": {
218
          "parameters": "manage_transfers"
219
        }
220
      }
221
    }
222
  },
223
  "/transfer_limits/batch": {
224
    "post": {
225
      "x-mojo-to": "TransferLimits#batch_add",
226
      "operationId": "batchAddTransferLimits",
227
      "tags": [
228
        "transfer"
229
      ],
230
      "parameters": [
231
        {
232
          "name": "body",
233
          "in": "body",
234
          "description": "A JSON object containing information about new transfer limits.",
235
          "required": true,
236
          "schema": {
237
          "type": "object",
238
          "properties": {
239
              "to_library_id": {
240
                "type": "string",
241
                "description": "Internal library id for which library the item is going to"
242
              },
243
              "from_library_id": {
244
                "type": "string",
245
                "description": "Internal library id for which library the item is coming from"
246
              },
247
              "item_type": {
248
                "type": ["string", "null"],
249
                "description": "Itemtype defining the type for this limi"
250
              },
251
              "collection_code": {
252
                "type": ["string", "null"],
253
                "description": "Authorized value for the collection code associated with this limit"
254
              }
255
            },
256
            "additionalProperties": false
257
          }
258
        }
259
      ],
260
      "produces": [
261
        "application/json"
262
      ],
263
      "responses": {
264
        "201": {
265
          "description": "A list of transfer limits",
266
          "schema": {
267
            "type": "array",
268
            "items": {
269
              "$ref": "../definitions.json#/transfer_limit"
270
            }
271
          }
272
        },
273
        "500": {
274
          "description": "Internal error",
275
          "schema": {
276
            "$ref": "../definitions.json#/error"
277
          }
278
        },
279
        "503": {
280
          "description": "Under maintenance",
281
          "schema": {
282
            "$ref": "../definitions.json#/error"
283
          }
284
        }
285
      },
286
      "x-koha-authorization": {
287
        "permissions": {
288
          "parameters": "manage_transfers"
289
        }
290
      }
291
    },
292
    "delete": {
293
      "x-mojo-to": "TransferLimits#batch_delete",
294
      "operationId": "batchDeleteTransferLimits",
295
      "tags": [
296
        "transfer"
297
      ],
298
      "parameters": [
299
        {
300
          "name": "body",
301
          "in": "body",
302
          "description": "A JSON object containing information about new transfer limits.",
303
          "required": true,
304
          "schema": {
305
            "type": "object",
306
            "properties": {
307
              "to_library_id": {
308
                "type": "string",
309
                "description": "Internal library id for which library the item is going to"
310
              },
311
              "from_library_id": {
312
                "type": "string",
313
                "description": "Internal library id for which library the item is coming from"
314
              },
315
              "item_type": {
316
                "type": ["string", "null"],
317
                "description": "Itemtype defining the type for this limi"
318
              },
319
              "collection_code": {
320
                "type": ["string", "null"],
321
                "description": "Authorized value for the collection code associated with this limit"
322
              }
323
            },
324
            "additionalProperties": false
325
          }
326
        }
327
      ],
328
      "produces": [
329
        "application/json"
330
      ],
331
      "responses": {
332
        "204": {
333
          "description": "Transfer limits deleted",
334
          "schema": {
335
            "type": "string"
336
          }
337
        },
338
        "401": {
339
          "description": "Authentication required",
340
          "schema": {
341
            "$ref": "../definitions.json#/error"
342
          }
343
        },
344
        "403": {
345
          "description": "Access forbidden",
346
          "schema": {
347
            "$ref": "../definitions.json#/error"
348
          }
349
        },
350
        "404": {
351
          "description": "Library not found",
352
          "schema": {
353
            "$ref": "../definitions.json#/error"
354
          }
355
        },
356
        "500": {
357
          "description": "Internal error",
358
          "schema": {
359
            "$ref": "../definitions.json#/error"
360
          }
361
        },
362
        "503": {
363
          "description": "Under maintenance",
364
          "schema": {
365
            "$ref": "../definitions.json#/error"
366
          }
367
        }
368
      },
369
      "x-koha-authorization": {
370
        "permissions": {
371
          "parameters": "manage_transfers"
372
        }
373
      }
374
    }
375
  }
376
}
(-)a/api/v1/swagger/paths/transfer_limits.yaml (-1 / +254 lines)
Line 0 Link Here
0
- 
1
---
2
"/transfer_limits":
3
  get:
4
    x-mojo-to: TransferLimits#list
5
    operationId: listTransferLimits
6
    tags:
7
    - transfer
8
    parameters:
9
    - name: to_library_id
10
      in: query
11
      description: Search on to_library_id
12
      required: false
13
      type: string
14
    - name: from_library_id
15
      in: query
16
      description: Search on from_library_id
17
      required: false
18
      type: string
19
    - name: item_type
20
      in: query
21
      description: Search on item_type
22
      required: false
23
      type: string
24
    - name: collection_code
25
      in: query
26
      description: Search on collection_code
27
      required: false
28
      type: string
29
    - "$ref": "../parameters.json#/match"
30
    - "$ref": "../parameters.json#/order_by"
31
    - "$ref": "../parameters.json#/page"
32
    - "$ref": "../parameters.json#/per_page"
33
    - "$ref": "../parameters.json#/q_param"
34
    - "$ref": "../parameters.json#/q_body"
35
    - "$ref": "../parameters.json#/q_header"
36
    produces:
37
    - application/json
38
    responses:
39
      '200':
40
        description: A list of transfer limits
41
        schema:
42
          type: array
43
          items:
44
            "$ref": "../definitions.json#/transfer_limit"
45
      '500':
46
        description: Internal error
47
        schema:
48
          "$ref": "../definitions.json#/error"
49
      '503':
50
        description: Under maintenance
51
        schema:
52
          "$ref": "../definitions.json#/error"
53
    x-koha-authorization:
54
      permissions:
55
        parameters: manage_transfers
56
  post:
57
    x-mojo-to: TransferLimits#add
58
    operationId: addTransferLimit
59
    tags:
60
    - transfer
61
    parameters:
62
    - name: body
63
      in: body
64
      description: A JSON object containing information about a new transfer limit
65
      required: true
66
      schema:
67
        "$ref": "../definitions.json#/transfer_limit"
68
    produces:
69
    - application/json
70
    responses:
71
      '201':
72
        description: Transfer limit added
73
        schema:
74
          "$ref": "../definitions.json#/transfer_limit"
75
      '400':
76
        description: Bad request
77
        schema:
78
          "$ref": "../definitions.json#/error"
79
      '401':
80
        description: Authentication required
81
        schema:
82
          "$ref": "../definitions.json#/error"
83
      '403':
84
        description: Access forbidden
85
        schema:
86
          "$ref": "../definitions.json#/error"
87
      '409':
88
        description: Conflict in creating resource
89
        schema:
90
          "$ref": "../definitions.json#/error"
91
      '500':
92
        description: Internal error
93
        schema:
94
          "$ref": "../definitions.json#/error"
95
      '503':
96
        description: Under maintenance
97
        schema:
98
          "$ref": "../definitions.json#/error"
99
    x-koha-authorization:
100
      permissions:
101
        parameters: manage_transfers
102
"/transfer_limits/{limit_id}":
103
  delete:
104
    x-mojo-to: TransferLimits#delete
105
    operationId: deleteTransferLimit
106
    tags:
107
    - transfer
108
    parameters:
109
    - "$ref": "../parameters.json#/transfer_limit_id_pp"
110
    produces:
111
    - application/json
112
    responses:
113
      '204':
114
        description: Transfer limit deleted
115
        schema:
116
          type: string
117
      '401':
118
        description: Authentication required
119
        schema:
120
          "$ref": "../definitions.json#/error"
121
      '403':
122
        description: Access forbidden
123
        schema:
124
          "$ref": "../definitions.json#/error"
125
      '404':
126
        description: Library not found
127
        schema:
128
          "$ref": "../definitions.json#/error"
129
      '500':
130
        description: Internal error
131
        schema:
132
          "$ref": "../definitions.json#/error"
133
      '503':
134
        description: Under maintenance
135
        schema:
136
          "$ref": "../definitions.json#/error"
137
    x-koha-authorization:
138
      permissions:
139
        parameters: manage_transfers
140
"/transfer_limits/batch":
141
  post:
142
    x-mojo-to: TransferLimits#batch_add
143
    operationId: batchAddTransferLimits
144
    tags:
145
    - transfer
146
    parameters:
147
    - name: body
148
      in: body
149
      description: A JSON object containing information about new transfer limits.
150
      required: true
151
      schema:
152
        type: object
153
        properties:
154
          to_library_id:
155
            type: string
156
            description: Internal library id for which library the item is going to
157
          from_library_id:
158
            type: string
159
            description: Internal library id for which library the item is coming
160
              from
161
          item_type:
162
            type:
163
            - string
164
            - 'null'
165
            description: Itemtype defining the type for this limi
166
          collection_code:
167
            type:
168
            - string
169
            - 'null'
170
            description: Authorized value for the collection code associated with
171
              this limit
172
        additionalProperties: false
173
    produces:
174
    - application/json
175
    responses:
176
      '201':
177
        description: A list of transfer limits
178
        schema:
179
          type: array
180
          items:
181
            "$ref": "../definitions.json#/transfer_limit"
182
      '500':
183
        description: Internal error
184
        schema:
185
          "$ref": "../definitions.json#/error"
186
      '503':
187
        description: Under maintenance
188
        schema:
189
          "$ref": "../definitions.json#/error"
190
    x-koha-authorization:
191
      permissions:
192
        parameters: manage_transfers
193
  delete:
194
    x-mojo-to: TransferLimits#batch_delete
195
    operationId: batchDeleteTransferLimits
196
    tags:
197
    - transfer
198
    parameters:
199
    - name: body
200
      in: body
201
      description: A JSON object containing information about new transfer limits.
202
      required: true
203
      schema:
204
        type: object
205
        properties:
206
          to_library_id:
207
            type: string
208
            description: Internal library id for which library the item is going to
209
          from_library_id:
210
            type: string
211
            description: Internal library id for which library the item is coming
212
              from
213
          item_type:
214
            type:
215
            - string
216
            - 'null'
217
            description: Itemtype defining the type for this limi
218
          collection_code:
219
            type:
220
            - string
221
            - 'null'
222
            description: Authorized value for the collection code associated with
223
              this limit
224
        additionalProperties: false
225
    produces:
226
    - application/json
227
    responses:
228
      '204':
229
        description: Transfer limits deleted
230
        schema:
231
          type: string
232
      '401':
233
        description: Authentication required
234
        schema:
235
          "$ref": "../definitions.json#/error"
236
      '403':
237
        description: Access forbidden
238
        schema:
239
          "$ref": "../definitions.json#/error"
240
      '404':
241
        description: Library not found
242
        schema:
243
          "$ref": "../definitions.json#/error"
244
      '500':
245
        description: Internal error
246
        schema:
247
          "$ref": "../definitions.json#/error"
248
      '503':
249
        description: Under maintenance
250
        schema:
251
          "$ref": "../definitions.json#/error"
252
    x-koha-authorization:
253
      permissions:
254
        parameters: manage_transfers

Return to bug 26633