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

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

Improved adding Water UI in mapservice-webclient

  • Property mode set to 100644
File size: 17.4 KB
Line 
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
27- description: All actions used to manage users and api keys
28 name: users
29paths:
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
226 /waters:
227 get:
228 description: Returns all waters
229 operationId: waters_get
230 parameters:
231 - example: Missi
232 explode: true
233 in: query
234 name: name
235 required: false
236 schema:
237 $ref: '#/components/schemas/item_name'
238 style: form
239 - example: jane
240 explode: true
241 in: query
242 name: manager
243 required: false
244 schema:
245 $ref: '#/components/schemas/username'
246 style: form
247 - description: 'Order by field: name'
248 explode: true
249 in: query
250 name: orderBy
251 required: false
252 schema:
253 default: name
254 example: name
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
295 operationId: waters_create
296 requestBody:
297 content:
298 application/json:
299 examples:
300 Water:
301 $ref: '#/components/examples/WaterCreation'
302 schema:
303 $ref: '#/components/schemas/WaterCreation'
304 responses:
305 201:
306 content:
307 application/json:
308 examples:
309 Water:
310 $ref: '#/components/examples/Water'
311 schema:
312 $ref: '#/components/schemas/Water'
313 description: Water created
314 400:
315 content:
316 application/json:
317 examples:
318 HttpError:
319 $ref: '#/components/examples/HttpError'
320 schema:
321 $ref: '#/components/schemas/HttpError'
322 description: Bad Request (400)
323 401:
324 content:
325 application/json:
326 examples:
327 HttpError:
328 $ref: '#/components/examples/HttpError'
329 schema:
330 $ref: '#/components/schemas/HttpError'
331 description: Unauthorized (401) acces to resource
332 security:
333 - basicAuth: []
334 - apiKeyAuth: []
335 summary: Add a new water
336 tags:
337 - waters
338 x-openapi-router-controller: openapi_server.controllers.waters_controller
339 /waters/{id}:
340 get:
341 description: Returns the water identified by id
342 operationId: water_get_by_id
343 parameters:
344 - description: Item ID
345 explode: false
346 in: path
347 name: id
348 required: true
349 schema:
350 $ref: '#/components/schemas/item_id'
351 style: simple
352 responses:
353 200:
354 content:
355 application/json:
356 examples:
357 Water:
358 $ref: '#/components/examples/Water'
359 schema:
360 $ref: '#/components/schemas/Water'
361 description: OK
362 404:
363 content:
364 application/json:
365 examples:
366 HttpError:
367 $ref: '#/components/examples/HttpError'
368 schema:
369 $ref: '#/components/schemas/HttpError'
370 description: Water with given Id not found
371 summary: Represents a water
372 tags:
373 - waters
374 x-openapi-router-controller: openapi_server.controllers.waters_controller
375components:
376 examples:
377 User:
378 value:
379 username: jane
380 email: jane@example.org
381 firstName: Jane
382 lastName: Doe
383 activated: true
384 apiKeys:
385 - ApiKey4701
386 UserCreation:
387 value:
388 username: richard
389 email: richard@examle.org
390 firstName: Richard
391 lastName: Roe
392 password: sdfl.1238_ASDkeil?
393 Water:
394 summary: A water example object
395 value:
396 waterId: 1
397 name: Mississippi
398 osmId: 1756854
399 osmType: R
400 link: http://gnuboat.engsas.com/mapservice/v1/waters/1
401 WaterCreation:
402 summary: A water example object for creation of a water
403 value:
404 name: Mississippi
405 osmId: 1756854
406 osmType: R
407 waters:
408 summary: A sample list with waters
409 value:
410 - waterId: 1
411 name: Mississippi
412 osmId: 1756854
413 osmType: R
414 link: http://gnuboat.engsas.com/mapservice/v1/waters/1
415 - waterId: 2
416 name: Bodensee
417 link: http://gnuboat.engsas.com/mapservice/v1/waters/2
418 HttpError:
419 value:
420 code: 404
421 message: Water with id 999999 not found
422 parameters:
423 orderBy:
424 description: 'Order by field: name'
425 explode: true
426 in: query
427 name: orderBy
428 required: false
429 schema:
430 default: name
431 example: name
432 type: string
433 style: form
434 order:
435 description: Order
436 explode: true
437 in: query
438 name: order
439 required: false
440 schema:
441 $ref: '#/components/schemas/order'
442 style: form
443 offset:
444 description: Skip over a number of elements by specifying an offset value for the query
445 explode: true
446 in: query
447 name: offset
448 required: false
449 schema:
450 default: 0
451 example: 0
452 format: int32
453 type: integer
454 style: form
455 limit:
456 description: Limit the number of elements on the response
457 explode: true
458 in: query
459 name: limit
460 required: false
461 schema:
462 default: 10
463 example: 10
464 format: int32
465 type: integer
466 style: form
467 responses:
468 BadRequest:
469 content:
470 application/json:
471 examples:
472 HttpError:
473 $ref: '#/components/examples/HttpError'
474 schema:
475 $ref: '#/components/schemas/HttpError'
476 description: Bad Request (400)
477 Unauthorized:
478 content:
479 application/json:
480 examples:
481 HttpError:
482 $ref: '#/components/examples/HttpError'
483 schema:
484 $ref: '#/components/schemas/HttpError'
485 description: Unauthorized (401) acces to resource
486 NotFound:
487 content:
488 application/json:
489 examples:
490 HttpError:
491 $ref: '#/components/examples/HttpError'
492 schema:
493 $ref: '#/components/schemas/HttpError'
494 description: Water with given Id not found
495 schemas:
496 username:
497 title: Username
498 type: string
499 apiKey:
500 title: API Key
501 type: string
502 apiKeys:
503 items:
504 $ref: '#/components/schemas/apiKey'
505 title: Array of API keys
506 type: array
507 activationCode:
508 title: Activation code for a User
509 type: string
510 item_id:
511 format: int32
512 title: Item ID
513 type: integer
514 item_name:
515 title: Item Name
516 type: string
517 osmType:
518 maxLength: 1
519 minLength: 1
520 type: string
521 User:
522 example:
523 firstName: firstName
524 lastName: lastName
525 apiKeys:
526 - null
527 - null
528 email: email
529 username: username
530 activated: true
531 properties:
532 username:
533 title: Username
534 type: string
535 email:
536 type: string
537 firstName:
538 type: string
539 lastName:
540 type: string
541 activated:
542 type: boolean
543 apiKeys:
544 items:
545 $ref: '#/components/schemas/apiKey'
546 title: Array of API keys
547 type: array
548 title: User
549 type: object
550 UserCreation:
551 example:
552 firstName: firstName
553 lastName: lastName
554 password: password
555 email: email
556 username: username
557 properties:
558 username:
559 title: Username
560 type: string
561 email:
562 type: string
563 firstName:
564 type: string
565 lastName:
566 type: string
567 password:
568 type: string
569 required:
570 - email
571 - firstName
572 - lastName
573 - password
574 - username
575 title: User
576 type: object
577 Water:
578 example:
579 manager: manager
580 osmId: 6
581 name: name
582 osmType: osmType
583 osm_class: osm_class
584 waterId: 0
585 properties:
586 waterId:
587 format: int32
588 title: Item ID
589 type: integer
590 name:
591 title: Item Name
592 type: string
593 manager:
594 title: Username
595 type: string
596 osmId:
597 format: int32
598 title: Item ID
599 type: integer
600 osmType:
601 maxLength: 1
602 minLength: 1
603 type: string
604 osm_class:
605 maxLength: 1
606 minLength: 1
607 type: string
608 required:
609 - name
610 - waterId
611 title: Water
612 type: object
613 WaterCreation:
614 example:
615 osmId: 0
616 name: name
617 osmType: osmType
618 properties:
619 name:
620 title: Item Name
621 type: string
622 osmId:
623 format: int32
624 title: Item ID
625 type: integer
626 osmType:
627 maxLength: 1
628 minLength: 1
629 type: string
630 required:
631 - name
632 title: Water
633 type: object
634 waters:
635 items:
636 $ref: '#/components/schemas/Water'
637 title: waters
638 type: array
639 order:
640 default: asc
641 description: |
642 Sort order:
643 * `asc` - Ascending, from A to Z
644 * `desc` - Descending, from Z to A
645 enum:
646 - desc
647 - asc
648 example: asc
649 title: order
650 type: string
651 HttpError:
652 properties:
653 code:
654 format: int32
655 type: integer
656 message:
657 type: string
658 required:
659 - code
660 - message
661 title: HTTP Error Response Object
662 type: object
663 securitySchemes:
664 basicAuth:
665 scheme: basic
666 type: http
667 x-basicInfoFunc: openapi_server.server_impl.security.Security.auth_basic
668 apiKeyAuth:
669 in: header
670 name: X-API-KEY
671 type: apiKey
672 x-apikeyInfoFunc: openapi_server.server_impl.security.Security.auth_api
Note: See TracBrowser for help on using the repository browser.