-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathsortingURLScheme.json
294 lines (294 loc) · 8.88 KB
/
sortingURLScheme.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
{
"openapi": "3.1.0",
"info": {
"title": "Sorting-related messages API Specifications",
"description": "Specifications for messages that support livestock sorting management.",
"version": "1.4",
"contact": {
"name": "Animal Data Exchange Working Group",
"url": "https://www.icar.org/index.php/technical-bodies/working-groups/animal-data-exchange-wg/",
"email": "[email protected]"
}
},
"servers": [
{
"url": "https://icar-ade.standard.com"
}
],
"tags": [
{
"name": "ADE-1.4-sorting",
"description": "Sorting messages approved by the working group"
}
],
"paths": {
"/locations/{location-scheme}/{location-id}/sorting-sites": {
"get": {
"operationId": "get-sorting-sites",
"summary": "Get the sorting-sites for a certain location",
"description": "# Purpose\nProvides the sorting-sites for a location\n",
"tags": [
"ADE-1.4-sorting"
],
"parameters": [
{
"$ref": "#/components/parameters/location-scheme"
},
{
"$ref": "#/components/parameters/location-id"
}
],
"responses": {
"200": {
"description": "Successful. The response contains the resources for the given location.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/icarSortingSiteCollection"
}
}
}
},
"default": {
"$ref": "#/components/responses/default"
}
}
}
},
"/locations/{location-scheme}/{location-id}/{animal-scheme}/{animal-id}/sorting": {
"get": {
"operationId": "get-animal-sorting",
"summary": "Get the sorting of a certain animal for a certain site",
"description": "# Purpose\nProvides the sorting of a certain animal\n",
"tags": [
"ADE-1.4-sorting"
],
"parameters": [
{
"$ref": "#/components/parameters/location-scheme"
},
{
"$ref": "#/components/parameters/location-id"
},
{
"$ref": "#/components/parameters/animal-scheme"
},
{
"$ref": "#/components/parameters/animal-id"
}
],
"responses": {
"200": {
"description": "Successful. The response contains the resources for the given location.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/icarAnimalSortingCommandResource"
}
}
}
},
"default": {
"$ref": "#/components/responses/default"
}
}
},
"delete": {
"operationId": "delete-animal-sorting",
"summary": "Delete sorting for a certain animal of a location",
"description": "# Purpose\nProvides the deletion of sorting for a location\n",
"tags": [
"ADE-1.4-sorting"
],
"parameters": [
{
"$ref": "#/components/parameters/location-scheme"
},
{
"$ref": "#/components/parameters/location-id"
},
{
"$ref": "#/components/parameters/animal-scheme"
},
{
"$ref": "#/components/parameters/animal-id"
}
],
"responses": {
"200": {
"description": "Successful."
},
"default": {
"$ref": "#/components/responses/default"
}
}
}
},
"/locations/{location-scheme}/{location-id}/sortings": {
"get": {
"operationId": "get-all-animal-sorting-commands",
"summary": "Get the known sorting-commands for all animals of a certain location",
"description": "# Purpose\nProvides the known sorting-commands for all animals of a location\n",
"tags": [
"ADE-1.4-sorting"
],
"parameters": [
{
"$ref": "#/components/parameters/location-scheme"
},
{
"$ref": "#/components/parameters/location-id"
}
],
"responses": {
"200": {
"description": "Successful. The response contains the resources for the given location.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/icarAnimalSortingCommandCollection"
}
}
}
},
"default": {
"$ref": "#/components/responses/default"
}
}
},
"post": {
"operationId": "post-animal-sorting",
"summary": "Add an animal into a sorting-site.",
"description": "# Purpose\nAllows a client to add an animal to a sorting-site",
"tags": [
"ADE-1.4-sorting"
],
"parameters": [
{
"$ref": "#/components/parameters/location-scheme"
},
{
"$ref": "#/components/parameters/location-id"
}
],
"requestBody": {
"required": true,
"description": "The sorting of an animal to be create. \nA client MAY fill in the *Id* field with a client-generated UUID and the server MAY use this *Id*.\nIf the server does not use the client-specified *ID* field it shall issue its own *ID* for the resource.\nA client SHALL ensure that the *meta.source* and *meta.sourceId* fields are filled by the client.\n",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/icarAnimalSortingCommandResource"
}
}
}
},
"responses": {
"200": {
"description": "Successful. The response contains a copy of the event, as modified by the server.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/icarAnimalSortingCommandResource"
}
}
}
},
"201": {
"description": "Created. The Location header contains the URI to the new resource.",
"headers": {
"Location": {
"schema": {
"type": "string",
"format": "uri"
},
"description": "Contains the URI to the new resource."
}
}
},
"202": {
"description": "Accepted. The Location header contains a URI that the client can query for processing status.",
"headers": {
"Location": {
"schema": {
"type": "string",
"format": "uri"
},
"description": "Contains a URI to query creation status."
}
}
},
"400": {
"$ref": "#/components/responses/default"
},
"500": {
"$ref": "#/components/responses/default"
}
}
}
}
},
"components": {
"schemas": {
"icarAnimalSortingCommandCollection": {
"$ref": "../collections/icarAnimalSortingCommandCollection.json"
},
"icarSortingSiteCollection": {
"$ref": "../collections/icarSortingSiteCollection.json"
},
"icarAnimalSortingCommandResource": {
"$ref": "../resources/icarAnimalSortingCommandResource.json"
}
},
"parameters": {
"location-scheme": {
"name": "location-scheme",
"in": "path",
"description": "The scheme id for the location identifier.",
"required": true,
"schema": {
"type": "string"
}
},
"location-id": {
"name": "location-id",
"in": "path",
"description": "The unique identifier for the location.",
"required": true,
"schema": {
"type": "string"
}
},
"animal-scheme": {
"name": "animal-scheme",
"in": "path",
"description": "The scheme id for the animal identifier.",
"required": true,
"schema": {
"type": "string"
}
},
"animal-id": {
"name": "animal-id",
"in": "path",
"description": "The unique identifier for the animal.",
"required": true,
"schema": {
"type": "string"
}
}
},
"responses": {
"default": {
"description": "An error has occured while handling the request. Check the content of the message for the error details.",
"content": {
"application/json": {
"schema": {
"$ref": "../collections/icarErrorCollection.json"
}
}
}
}
},
"examples": {}
}
}