source: src/mapservice/src-gen/openapi_server/openapi/openapi.yaml@ 1e7f556

debian/bullseye
Last change on this file since 1e7f556 was 041e464, checked in by Joachim Langenbach <joachim.langenbach@…>, 8 years ago

Adding waters is working

  • Property mode set to 100644
File size: 17.1 KB
RevLine 
[3a89adb]1openapi: 3.0.0
2info:
3 contact:
4 email: info@engsas.de
5 name: EngSaS - Engineering Solutions and Services Langenbach
6 url: http://www.engsas.com
7 description: API to upload log files with water depth to GNUBoat server
8 license:
9 name: GPL 3
10 url: https://www.gnu.org/licenses/gpl-3.0.en.html
11 title: GNUBoat Mapservice API
12 version: v1
13servers:
14- description: The production API server
15 url: https://gnuboat.engsas.com/mapservice/{version}
16 variables:
17 version:
18 default: v1
19- description: The local flask development url
20 url: http://localhost:8080/mapservice/{version}
21 variables:
22 version:
23 default: v1
24tags:
25- description: A water is a river (like Mississippi, lake (Lake Ontario), or a sea (North Sea)
26 name: waters
[be25db1]27- description: All actions used to manage users and api keys
28 name: users
[3a89adb]29paths:
[be25db1]30 /user:
31 get:
32 description: Returns information for a user
33 operationId: users_get
34 responses:
35 200:
36 content:
37 application/json:
38 examples:
39 User:
40 $ref: '#/components/examples/User'
41 schema:
42 $ref: '#/components/schemas/User'
43 description: OK
44 400:
45 content:
46 application/json:
47 examples:
48 HttpError:
49 $ref: '#/components/examples/HttpError'
50 schema:
51 $ref: '#/components/schemas/HttpError'
52 description: Bad Request (400)
53 401:
54 content:
55 application/json:
56 examples:
57 HttpError:
58 $ref: '#/components/examples/HttpError'
59 schema:
60 $ref: '#/components/schemas/HttpError'
61 description: Unauthorized (401) acces to resource
62 security:
63 - basicAuth: []
64 - apiKeyAuth: []
65 summary: Returns info of a user
66 tags:
67 - users
68 x-openapi-router-controller: openapi_server.controllers.users_controller
69 options:
70 description: Used by CORS preflight
71 operationId: user_options
72 responses:
73 200:
74 content:
75 application/json: {}
76 description: CORS prefilght requests should return 200 as status code
77 tags:
78 - users
79 x-openapi-router-controller: openapi_server.controllers.users_controller
80 post:
81 description: Registers a new user
82 operationId: users_register
83 requestBody:
84 content:
85 application/json:
86 examples:
87 Water:
88 $ref: '#/components/examples/UserCreation'
89 schema:
90 $ref: '#/components/schemas/UserCreation'
91 responses:
92 201:
93 content:
94 application/json:
95 examples:
96 Water:
97 $ref: '#/components/examples/User'
98 schema:
99 $ref: '#/components/schemas/User'
100 description: Userr created
101 400:
102 content:
103 application/json:
104 examples:
105 HttpError:
106 $ref: '#/components/examples/HttpError'
107 schema:
108 $ref: '#/components/schemas/HttpError'
109 description: Bad Request (400)
110 summary: Registers a new user
111 tags:
112 - users
113 x-openapi-router-controller: openapi_server.controllers.users_controller
114 /user/apikey_create:
115 get:
116 description: Generates and returns a new API key for current user
117 operationId: users_api_key_create
118 responses:
119 200:
120 content:
121 application/json:
122 example: NewApiKey4711
123 schema:
124 $ref: '#/components/schemas/apiKeys'
125 description: OK
126 400:
127 content:
128 application/json:
129 examples:
130 HttpError:
131 $ref: '#/components/examples/HttpError'
132 schema:
133 $ref: '#/components/schemas/HttpError'
134 description: Bad Request (400)
135 401:
136 content:
137 application/json:
138 examples:
139 HttpError:
140 $ref: '#/components/examples/HttpError'
141 schema:
142 $ref: '#/components/schemas/HttpError'
143 description: Unauthorized (401) acces to resource
144 security:
145 - basicAuth: []
146 - apiKeyAuth: []
147 summary: Returns a new API key
148 tags:
149 - users
150 x-openapi-router-controller: openapi_server.controllers.users_controller
151 /user/{api_key}:
152 delete:
153 description: Deletes given API key and returns remaining API keys of the user
154 operationId: users_api_key_delete
155 parameters:
156 - description: API key
157 example: DelApiKey4711
158 explode: false
159 in: path
160 name: api_key
161 required: true
162 schema:
163 $ref: '#/components/schemas/apiKey'
164 style: simple
165 responses:
166 200:
167 content:
168 application/json:
169 example: ApiKey4711
170 schema:
171 $ref: '#/components/schemas/apiKeys'
172 description: OK
173 400:
174 content:
175 application/json:
176 examples:
177 HttpError:
178 $ref: '#/components/examples/HttpError'
179 schema:
180 $ref: '#/components/schemas/HttpError'
181 description: Bad Request (400)
182 401:
183 content:
184 application/json:
185 examples:
186 HttpError:
187 $ref: '#/components/examples/HttpError'
188 schema:
189 $ref: '#/components/schemas/HttpError'
190 description: Unauthorized (401) acces to resource
191 security:
192 - basicAuth: []
193 - apiKeyAuth: []
194 summary: Deletes API key
195 tags:
196 - users
197 x-openapi-router-controller: openapi_server.controllers.users_controller
198 /user/activate/{activation_code}:
199 get:
200 description: Activates a user account
201 operationId: users_activate
202 parameters:
203 - description: Activation code
204 example: dac9630aec642a428cd73f4be0a03569
205 explode: false
206 in: path
207 name: activation_code
208 required: true
209 schema:
210 $ref: '#/components/schemas/activationCode'
211 style: simple
212 responses:
213 302:
214 description: OK or not OK
215 headers:
216 Location:
217 description: URL to the website, showing the result of the activation
218 explode: false
219 schema:
220 type: string
221 style: simple
222 summary: Activates a user account
223 tags:
224 - users
225 x-openapi-router-controller: openapi_server.controllers.users_controller
[3a89adb]226 /waters:
227 get:
228 description: Returns all waters
229 operationId: waters_get
230 parameters:
[be25db1]231 - example: Missi
232 explode: true
233 in: query
[3a89adb]234 name: name
235 required: false
236 schema:
[041e464]237 $ref: '#/components/schemas/itemName'
[be25db1]238 style: form
239 - example: jane
240 explode: true
241 in: query
[3a89adb]242 name: manager
243 required: false
244 schema:
245 $ref: '#/components/schemas/username'
[be25db1]246 style: form
[3a89adb]247 - description: 'Order by field: name'
248 explode: true
249 in: query
250 name: orderBy
251 required: false
252 schema:
253 default: name
[be25db1]254 example: name
[3a89adb]255 type: string
256 style: form
257 - description: Skip over a number of elements by specifying an offset value for the query
258 explode: true
259 in: query
260 name: offset
261 required: false
262 schema:
263 default: 0
264 example: 0
265 format: int32
266 type: integer
267 style: form
268 - description: Limit the number of elements on the response
269 explode: true
270 in: query
271 name: limit
272 required: false
273 schema:
274 default: 10
275 example: 10
276 format: int32
277 type: integer
278 style: form
279 responses:
280 200:
281 content:
282 application/json:
283 examples:
284 Waters:
285 $ref: '#/components/examples/waters'
286 schema:
287 $ref: '#/components/schemas/waters'
288 description: OK
289 summary: Find waters by id
290 tags:
291 - waters
292 x-openapi-router-controller: openapi_server.controllers.waters_controller
293 post:
294 description: Adds a new water to the database
[be25db1]295 operationId: waters_create
[3a89adb]296 requestBody:
297 content:
298 application/json:
[041e464]299 example:
300 name: Rhein
301 osmId: 1756854
302 osmType: Relation
[3a89adb]303 schema:
304 $ref: '#/components/schemas/WaterCreation'
305 responses:
306 201:
307 content:
308 application/json:
309 examples:
310 Water:
311 $ref: '#/components/examples/Water'
312 schema:
313 $ref: '#/components/schemas/Water'
314 description: Water created
315 400:
316 content:
317 application/json:
318 examples:
319 HttpError:
320 $ref: '#/components/examples/HttpError'
321 schema:
322 $ref: '#/components/schemas/HttpError'
323 description: Bad Request (400)
324 401:
325 content:
326 application/json:
327 examples:
328 HttpError:
329 $ref: '#/components/examples/HttpError'
330 schema:
331 $ref: '#/components/schemas/HttpError'
332 description: Unauthorized (401) acces to resource
333 security:
334 - basicAuth: []
335 - apiKeyAuth: []
336 summary: Add a new water
337 tags:
338 - waters
339 x-openapi-router-controller: openapi_server.controllers.waters_controller
340 /waters/{id}:
341 get:
342 description: Returns the water identified by id
343 operationId: water_get_by_id
344 parameters:
345 - description: Item ID
346 explode: false
347 in: path
348 name: id
349 required: true
350 schema:
[041e464]351 $ref: '#/components/schemas/itemId'
[3a89adb]352 style: simple
353 responses:
354 200:
355 content:
356 application/json:
357 examples:
358 Water:
359 $ref: '#/components/examples/Water'
360 schema:
361 $ref: '#/components/schemas/Water'
362 description: OK
363 404:
364 content:
365 application/json:
366 examples:
367 HttpError:
368 $ref: '#/components/examples/HttpError'
369 schema:
370 $ref: '#/components/schemas/HttpError'
371 description: Water with given Id not found
372 summary: Represents a water
373 tags:
374 - waters
375 x-openapi-router-controller: openapi_server.controllers.waters_controller
376components:
377 examples:
[be25db1]378 User:
379 value:
380 username: jane
381 email: jane@example.org
382 firstName: Jane
383 lastName: Doe
384 activated: true
385 apiKeys:
386 - ApiKey4701
387 UserCreation:
388 value:
389 username: richard
390 email: richard@examle.org
391 firstName: Richard
392 lastName: Roe
393 password: sdfl.1238_ASDkeil?
[3a89adb]394 Water:
395 summary: A water example object
396 value:
[be25db1]397 waterId: 1
[3a89adb]398 name: Mississippi
[be25db1]399 osmId: 1756854
400 osmType: R
[3a89adb]401 WaterCreation:
402 summary: A water example object for creation of a water
403 value:
404 name: Mississippi
[be25db1]405 osmId: 1756854
[041e464]406 osmType: Relation
[3a89adb]407 waters:
408 summary: A sample list with waters
409 value:
[be25db1]410 - waterId: 1
[3a89adb]411 name: Mississippi
[be25db1]412 osmId: 1756854
[041e464]413 osmType: Relation
[be25db1]414 - waterId: 2
[3a89adb]415 name: Bodensee
416 HttpError:
417 value:
418 code: 404
419 message: Water with id 999999 not found
420 parameters:
421 orderBy:
422 description: 'Order by field: name'
423 explode: true
424 in: query
425 name: orderBy
426 required: false
427 schema:
428 default: name
[be25db1]429 example: name
[3a89adb]430 type: string
431 style: form
432 order:
433 description: Order
434 explode: true
435 in: query
436 name: order
437 required: false
438 schema:
439 $ref: '#/components/schemas/order'
440 style: form
441 offset:
442 description: Skip over a number of elements by specifying an offset value for the query
443 explode: true
444 in: query
445 name: offset
446 required: false
447 schema:
448 default: 0
449 example: 0
450 format: int32
451 type: integer
452 style: form
453 limit:
454 description: Limit the number of elements on the response
455 explode: true
456 in: query
457 name: limit
458 required: false
459 schema:
460 default: 10
461 example: 10
462 format: int32
463 type: integer
464 style: form
465 responses:
466 BadRequest:
467 content:
468 application/json:
469 examples:
470 HttpError:
471 $ref: '#/components/examples/HttpError'
472 schema:
473 $ref: '#/components/schemas/HttpError'
474 description: Bad Request (400)
475 Unauthorized:
476 content:
477 application/json:
478 examples:
479 HttpError:
480 $ref: '#/components/examples/HttpError'
481 schema:
482 $ref: '#/components/schemas/HttpError'
483 description: Unauthorized (401) acces to resource
484 NotFound:
485 content:
486 application/json:
487 examples:
488 HttpError:
489 $ref: '#/components/examples/HttpError'
490 schema:
491 $ref: '#/components/schemas/HttpError'
492 description: Water with given Id not found
493 schemas:
494 username:
495 title: Username
496 type: string
[be25db1]497 apiKey:
498 title: API Key
499 type: string
500 apiKeys:
501 items:
502 $ref: '#/components/schemas/apiKey'
503 title: Array of API keys
504 type: array
505 activationCode:
506 title: Activation code for a User
507 type: string
[041e464]508 itemId:
[3a89adb]509 format: int32
510 title: Item ID
511 type: integer
[041e464]512 itemName:
[3a89adb]513 title: Item Name
514 type: string
[be25db1]515 osmType:
[041e464]516 enum:
517 - Node
518 - Way
519 - Relation
520 title: OSM type of item (N|W|R)
[3a89adb]521 type: string
[be25db1]522 User:
523 example:
524 firstName: firstName
525 lastName: lastName
526 apiKeys:
527 - null
528 - null
529 email: email
530 username: username
531 activated: true
532 properties:
533 username:
534 title: Username
535 type: string
536 email:
537 type: string
538 firstName:
539 type: string
540 lastName:
541 type: string
542 activated:
543 type: boolean
544 apiKeys:
545 items:
546 $ref: '#/components/schemas/apiKey'
547 title: Array of API keys
548 type: array
549 title: User
550 type: object
551 UserCreation:
552 example:
553 firstName: firstName
554 lastName: lastName
555 password: password
556 email: email
557 username: username
558 properties:
559 username:
560 title: Username
561 type: string
562 email:
563 type: string
564 firstName:
565 type: string
566 lastName:
567 type: string
568 password:
569 type: string
570 required:
571 - email
572 - firstName
573 - lastName
574 - password
575 - username
576 title: User
577 type: object
[3a89adb]578 Water:
579 example:
580 manager: manager
[be25db1]581 osmId: 6
[3a89adb]582 name: name
[be25db1]583 waterId: 0
[3a89adb]584 properties:
[be25db1]585 waterId:
[3a89adb]586 format: int32
587 title: Item ID
588 type: integer
589 name:
590 title: Item Name
591 type: string
592 manager:
593 title: Username
594 type: string
[be25db1]595 osmId:
[3a89adb]596 format: int32
597 title: Item ID
598 type: integer
[be25db1]599 osmType:
[041e464]600 $ref: '#/components/schemas/osmType'
[3a89adb]601 required:
602 - name
[be25db1]603 - waterId
[3a89adb]604 title: Water
605 type: object
606 WaterCreation:
607 example:
[be25db1]608 osmId: 0
[3a89adb]609 name: name
610 properties:
611 name:
612 title: Item Name
613 type: string
[be25db1]614 osmId:
[3a89adb]615 format: int32
616 title: Item ID
617 type: integer
[be25db1]618 osmType:
[041e464]619 $ref: '#/components/schemas/osmType'
[3a89adb]620 required:
621 - name
622 title: Water
623 type: object
624 waters:
625 items:
626 $ref: '#/components/schemas/Water'
627 title: waters
628 type: array
629 order:
630 default: asc
631 description: |
632 Sort order:
633 * `asc` - Ascending, from A to Z
634 * `desc` - Descending, from Z to A
635 enum:
636 - desc
637 - asc
638 example: asc
639 title: order
640 type: string
641 HttpError:
642 properties:
643 code:
644 format: int32
645 type: integer
646 message:
647 type: string
648 required:
649 - code
650 - message
651 title: HTTP Error Response Object
652 type: object
653 securitySchemes:
654 basicAuth:
655 scheme: basic
656 type: http
657 x-basicInfoFunc: openapi_server.server_impl.security.Security.auth_basic
658 apiKeyAuth:
659 in: header
660 name: X-API-KEY
661 type: apiKey
662 x-apikeyInfoFunc: openapi_server.server_impl.security.Security.auth_api
Note: See TracBrowser for help on using the repository browser.