Lines 1-11
Link Here
|
1 |
--- |
1 |
--- |
|
|
2 |
"/rotas": |
3 |
get: |
4 |
x-mojo-to: StockRotation::Rotas#list |
5 |
operationId: listRotas |
6 |
tags: |
7 |
- stockrotation |
8 |
summary: List rotas |
9 |
produces: |
10 |
- application/json |
11 |
parameters: |
12 |
- $ref: "../swagger.yaml#/parameters/match" |
13 |
- $ref: "../swagger.yaml#/parameters/order_by" |
14 |
- $ref: "../swagger.yaml#/parameters/page" |
15 |
- $ref: "../swagger.yaml#/parameters/per_page" |
16 |
- $ref: "../swagger.yaml#/parameters/q_param" |
17 |
- $ref: "../swagger.yaml#/parameters/q_body" |
18 |
- $ref: "../swagger.yaml#/parameters/request_id_header" |
19 |
responses: |
20 |
"200": |
21 |
description: A list of stockrotation rotas |
22 |
schema: |
23 |
type: array |
24 |
items: |
25 |
$ref: "../swagger.yaml#/definitions/rota" |
26 |
"403": |
27 |
description: Access forbidden |
28 |
schema: |
29 |
$ref: "../swagger.yaml#/definitions/error" |
30 |
"500": |
31 |
description: | |
32 |
Internal server error. Possible `error_code` attribute values: |
33 |
|
34 |
* `internal_server_error` |
35 |
schema: |
36 |
$ref: "../swagger.yaml#/definitions/error" |
37 |
"503": |
38 |
description: Under maintenance |
39 |
schema: |
40 |
$ref: "../swagger.yaml#/definitions/error" |
41 |
x-koha-authorization: |
42 |
permissions: |
43 |
catalogue: "1" |
44 |
post: |
45 |
x-mojo-to: StockRotation::Rotas#add |
46 |
operationId: addRota |
47 |
tags: |
48 |
- stockrotation |
49 |
summary: Add rota |
50 |
parameters: |
51 |
- name: body |
52 |
in: body |
53 |
description: A JSON object containing informations about the new hold |
54 |
required: true |
55 |
schema: |
56 |
$ref: "../swagger.yaml#/definitions/rota" |
57 |
produces: |
58 |
- application/json |
59 |
responses: |
60 |
"201": |
61 |
description: Rota added |
62 |
schema: |
63 |
$ref: "../swagger.yaml#/definitions/rota" |
64 |
"401": |
65 |
description: Authentication required |
66 |
schema: |
67 |
$ref: "../swagger.yaml#/definitions/error" |
68 |
"403": |
69 |
description: Access forbidden |
70 |
schema: |
71 |
$ref: "../swagger.yaml#/definitions/error" |
72 |
"500": |
73 |
description: | |
74 |
Internal server error. Possible `error_code` attribute values: |
75 |
|
76 |
* `internal_server_error` |
77 |
schema: |
78 |
$ref: "../swagger.yaml#/definitions/error" |
79 |
"503": |
80 |
description: Under maintenance |
81 |
schema: |
82 |
$ref: "../swagger.yaml#/definitions/error" |
83 |
x-koha-authorization: |
84 |
permissions: |
85 |
stockrotation: "1" |
86 |
"/rotas/{rota_id}": |
87 |
get: |
88 |
x-mojo-to: StockRotation::Rotas#get |
89 |
operationId: getRota |
90 |
tags: |
91 |
- stockrotation |
92 |
summary: Get rota |
93 |
parameters: |
94 |
- $ref: "../swagger.yaml#/parameters/rota_id_pp" |
95 |
produces: |
96 |
- application/json |
97 |
responses: |
98 |
"200": |
99 |
description: A rota |
100 |
schema: |
101 |
$ref: "../swagger.yaml#/definitions/rota" |
102 |
"404": |
103 |
description: Rota not found |
104 |
schema: |
105 |
$ref: "../swagger.yaml#/definitions/error" |
106 |
"500": |
107 |
description: | |
108 |
Internal server error. Possible `error_code` attribute values: |
109 |
|
110 |
* `internal_server_error` |
111 |
schema: |
112 |
$ref: "../swagger.yaml#/definitions/error" |
113 |
"503": |
114 |
description: Under maintenance |
115 |
schema: |
116 |
$ref: "../swagger.yaml#/definitions/error" |
117 |
x-koha-authorization: |
118 |
permissions: |
119 |
catalogue: "1" |
120 |
put: |
121 |
x-mojo-to: StockRotation::Rotas#update |
122 |
operationId: updateRota |
123 |
tags: |
124 |
- stockrotation |
125 |
summary: Update rota |
126 |
parameters: |
127 |
- $ref: "../swagger.yaml#/parameters/rota_id_pp" |
128 |
- name: body |
129 |
in: body |
130 |
description: A rota object |
131 |
required: true |
132 |
schema: |
133 |
$ref: "../swagger.yaml#/definitions/rota" |
134 |
produces: |
135 |
- application/json |
136 |
responses: |
137 |
"200": |
138 |
description: A rota |
139 |
schema: |
140 |
$ref: "../swagger.yaml#/definitions/rota" |
141 |
"401": |
142 |
description: Authentication required |
143 |
schema: |
144 |
$ref: "../swagger.yaml#/definitions/error" |
145 |
"403": |
146 |
description: Access forbidden |
147 |
schema: |
148 |
$ref: "../swagger.yaml#/definitions/error" |
149 |
"404": |
150 |
description: Rota not found |
151 |
schema: |
152 |
$ref: "../swagger.yaml#/definitions/error" |
153 |
"500": |
154 |
description: Internal error |
155 |
schema: |
156 |
$ref: "../swagger.yaml#/definitions/error" |
157 |
"503": |
158 |
description: Under maintenance |
159 |
schema: |
160 |
$ref: "../swagger.yaml#/definitions/error" |
161 |
x-koha-authorization: |
162 |
permissions: |
163 |
stockrotation: "1" |
164 |
delete: |
165 |
x-mojo-to: StockRotation::Rotas#delete |
166 |
operationId: deleteRota |
167 |
tags: |
168 |
- stockrotation |
169 |
summary: Delete rota |
170 |
parameters: |
171 |
- $ref: "../swagger.yaml#/parameters/rota_id_pp" |
172 |
produces: |
173 |
- application/json |
174 |
responses: |
175 |
"204": |
176 |
description: Rota deleted |
177 |
"401": |
178 |
description: Authentication required |
179 |
schema: |
180 |
$ref: "../swagger.yaml#/definitions/error" |
181 |
"403": |
182 |
description: Access forbidden |
183 |
schema: |
184 |
$ref: "../swagger.yaml#/definitions/error" |
185 |
"404": |
186 |
description: Rota not found |
187 |
schema: |
188 |
$ref: "../swagger.yaml#/definitions/error" |
189 |
"500": |
190 |
description: Internal error |
191 |
schema: |
192 |
$ref: "../swagger.yaml#/definitions/error" |
193 |
"503": |
194 |
description: Under maintenance |
195 |
schema: |
196 |
$ref: "../swagger.yaml#/definitions/error" |
197 |
x-koha-authorization: |
198 |
permissions: |
199 |
stockrotation: "1" |
2 |
"/rotas/{rota_id}/stages/{stage_id}/position": |
200 |
"/rotas/{rota_id}/stages/{stage_id}/position": |
3 |
put: |
201 |
put: |
4 |
x-mojo-to: StockRotation::Stage#move |
202 |
x-mojo-to: StockRotation::Stage#move |
5 |
operationId: moveStage |
203 |
operationId: moveStage |
6 |
summary: Update stage |
204 |
summary: Update stage |
7 |
tags: |
205 |
tags: |
8 |
- rotas |
206 |
- stockrotation |
9 |
parameters: |
207 |
parameters: |
10 |
- name: rota_id |
208 |
- name: rota_id |
11 |
in: path |
209 |
in: path |