| [3a89adb] | 1 | openapi: 3.0.0
|
|---|
| 2 | info:
|
|---|
| 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
|
|---|
| 13 | servers:
|
|---|
| 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
|
|---|
| 24 | tags:
|
|---|
| [13cbe66] | 25 | - description: A water is a river (like Mississippi, lake (Lake Ontario), or a sea
|
|---|
| 26 | (North Sea)
|
|---|
| [3a89adb] | 27 | name: waters
|
|---|
| [be25db1] | 28 | - description: All actions used to manage users and api keys
|
|---|
| 29 | name: users
|
|---|
| [3a89adb] | 30 | paths:
|
|---|
| [be25db1] | 31 | /user:
|
|---|
| 32 | get:
|
|---|
| [13cbe66] | 33 | description: Returns information of current/authorized user
|
|---|
| [be25db1] | 34 | operationId: users_get
|
|---|
| 35 | responses:
|
|---|
| 36 | 200:
|
|---|
| 37 | content:
|
|---|
| 38 | application/json:
|
|---|
| 39 | examples:
|
|---|
| 40 | User:
|
|---|
| 41 | $ref: '#/components/examples/User'
|
|---|
| 42 | schema:
|
|---|
| 43 | $ref: '#/components/schemas/User'
|
|---|
| 44 | description: OK
|
|---|
| 45 | 400:
|
|---|
| 46 | content:
|
|---|
| 47 | application/json:
|
|---|
| 48 | examples:
|
|---|
| 49 | HttpError:
|
|---|
| 50 | $ref: '#/components/examples/HttpError'
|
|---|
| 51 | schema:
|
|---|
| 52 | $ref: '#/components/schemas/HttpError'
|
|---|
| 53 | description: Bad Request (400)
|
|---|
| 54 | 401:
|
|---|
| 55 | content:
|
|---|
| 56 | application/json:
|
|---|
| 57 | examples:
|
|---|
| 58 | HttpError:
|
|---|
| 59 | $ref: '#/components/examples/HttpError'
|
|---|
| 60 | schema:
|
|---|
| 61 | $ref: '#/components/schemas/HttpError'
|
|---|
| 62 | description: Unauthorized (401) acces to resource
|
|---|
| 63 | security:
|
|---|
| 64 | - basicAuth: []
|
|---|
| 65 | - apiKeyAuth: []
|
|---|
| 66 | summary: Returns info of a user
|
|---|
| 67 | tags:
|
|---|
| 68 | - users
|
|---|
| 69 | x-openapi-router-controller: openapi_server.controllers.users_controller
|
|---|
| 70 | options:
|
|---|
| 71 | description: Used by CORS preflight
|
|---|
| 72 | operationId: user_options
|
|---|
| 73 | responses:
|
|---|
| 74 | 200:
|
|---|
| 75 | content:
|
|---|
| 76 | application/json: {}
|
|---|
| 77 | description: CORS prefilght requests should return 200 as status code
|
|---|
| 78 | tags:
|
|---|
| 79 | - users
|
|---|
| 80 | x-openapi-router-controller: openapi_server.controllers.users_controller
|
|---|
| 81 | post:
|
|---|
| 82 | description: Registers a new user
|
|---|
| 83 | operationId: users_register
|
|---|
| 84 | requestBody:
|
|---|
| 85 | content:
|
|---|
| 86 | application/json:
|
|---|
| 87 | examples:
|
|---|
| 88 | Water:
|
|---|
| 89 | $ref: '#/components/examples/UserCreation'
|
|---|
| 90 | schema:
|
|---|
| 91 | $ref: '#/components/schemas/UserCreation'
|
|---|
| 92 | responses:
|
|---|
| 93 | 201:
|
|---|
| 94 | content:
|
|---|
| 95 | application/json:
|
|---|
| 96 | examples:
|
|---|
| 97 | Water:
|
|---|
| 98 | $ref: '#/components/examples/User'
|
|---|
| 99 | schema:
|
|---|
| 100 | $ref: '#/components/schemas/User'
|
|---|
| 101 | description: Userr created
|
|---|
| 102 | 400:
|
|---|
| 103 | content:
|
|---|
| 104 | application/json:
|
|---|
| 105 | examples:
|
|---|
| 106 | HttpError:
|
|---|
| 107 | $ref: '#/components/examples/HttpError'
|
|---|
| 108 | schema:
|
|---|
| 109 | $ref: '#/components/schemas/HttpError'
|
|---|
| 110 | description: Bad Request (400)
|
|---|
| 111 | summary: Registers a new user
|
|---|
| 112 | tags:
|
|---|
| 113 | - users
|
|---|
| 114 | x-openapi-router-controller: openapi_server.controllers.users_controller
|
|---|
| [13cbe66] | 115 | /user/activate/{activation_code}:
|
|---|
| 116 | get:
|
|---|
| 117 | description: Activates a user account
|
|---|
| 118 | operationId: users_activate
|
|---|
| 119 | parameters:
|
|---|
| 120 | - description: Activation code
|
|---|
| 121 | example: dac9630aec642a428cd73f4be0a03569
|
|---|
| 122 | explode: false
|
|---|
| 123 | in: path
|
|---|
| 124 | name: activation_code
|
|---|
| 125 | required: true
|
|---|
| 126 | schema:
|
|---|
| 127 | $ref: '#/components/schemas/activationCode'
|
|---|
| 128 | style: simple
|
|---|
| 129 | responses:
|
|---|
| 130 | 302:
|
|---|
| 131 | description: OK or not OK
|
|---|
| 132 | headers:
|
|---|
| 133 | Location:
|
|---|
| 134 | description: URL to the website, showing the result of the activation
|
|---|
| 135 | explode: false
|
|---|
| 136 | schema:
|
|---|
| 137 | type: string
|
|---|
| 138 | style: simple
|
|---|
| 139 | summary: Activates a user account
|
|---|
| 140 | tags:
|
|---|
| 141 | - users
|
|---|
| 142 | x-openapi-router-controller: openapi_server.controllers.users_controller
|
|---|
| [be25db1] | 143 | /user/apikey_create:
|
|---|
| 144 | get:
|
|---|
| 145 | description: Generates and returns a new API key for current user
|
|---|
| 146 | operationId: users_api_key_create
|
|---|
| 147 | responses:
|
|---|
| 148 | 200:
|
|---|
| 149 | content:
|
|---|
| 150 | application/json:
|
|---|
| 151 | example: NewApiKey4711
|
|---|
| 152 | schema:
|
|---|
| 153 | $ref: '#/components/schemas/apiKeys'
|
|---|
| 154 | description: OK
|
|---|
| 155 | 400:
|
|---|
| 156 | content:
|
|---|
| 157 | application/json:
|
|---|
| 158 | examples:
|
|---|
| 159 | HttpError:
|
|---|
| 160 | $ref: '#/components/examples/HttpError'
|
|---|
| 161 | schema:
|
|---|
| 162 | $ref: '#/components/schemas/HttpError'
|
|---|
| 163 | description: Bad Request (400)
|
|---|
| 164 | 401:
|
|---|
| 165 | content:
|
|---|
| 166 | application/json:
|
|---|
| 167 | examples:
|
|---|
| 168 | HttpError:
|
|---|
| 169 | $ref: '#/components/examples/HttpError'
|
|---|
| 170 | schema:
|
|---|
| 171 | $ref: '#/components/schemas/HttpError'
|
|---|
| 172 | description: Unauthorized (401) acces to resource
|
|---|
| 173 | security:
|
|---|
| 174 | - basicAuth: []
|
|---|
| 175 | summary: Returns a new API key
|
|---|
| 176 | tags:
|
|---|
| 177 | - users
|
|---|
| 178 | x-openapi-router-controller: openapi_server.controllers.users_controller
|
|---|
| 179 | /user/{api_key}:
|
|---|
| 180 | delete:
|
|---|
| 181 | description: Deletes given API key and returns remaining API keys of the user
|
|---|
| 182 | operationId: users_api_key_delete
|
|---|
| 183 | parameters:
|
|---|
| 184 | - description: API key
|
|---|
| 185 | example: DelApiKey4711
|
|---|
| 186 | explode: false
|
|---|
| 187 | in: path
|
|---|
| 188 | name: api_key
|
|---|
| 189 | required: true
|
|---|
| 190 | schema:
|
|---|
| 191 | $ref: '#/components/schemas/apiKey'
|
|---|
| 192 | style: simple
|
|---|
| 193 | responses:
|
|---|
| 194 | 200:
|
|---|
| 195 | content:
|
|---|
| 196 | application/json:
|
|---|
| 197 | example: ApiKey4711
|
|---|
| 198 | schema:
|
|---|
| 199 | $ref: '#/components/schemas/apiKeys'
|
|---|
| 200 | description: OK
|
|---|
| 201 | 400:
|
|---|
| 202 | content:
|
|---|
| 203 | application/json:
|
|---|
| 204 | examples:
|
|---|
| 205 | HttpError:
|
|---|
| 206 | $ref: '#/components/examples/HttpError'
|
|---|
| 207 | schema:
|
|---|
| 208 | $ref: '#/components/schemas/HttpError'
|
|---|
| 209 | description: Bad Request (400)
|
|---|
| 210 | 401:
|
|---|
| 211 | content:
|
|---|
| 212 | application/json:
|
|---|
| 213 | examples:
|
|---|
| 214 | HttpError:
|
|---|
| 215 | $ref: '#/components/examples/HttpError'
|
|---|
| 216 | schema:
|
|---|
| 217 | $ref: '#/components/schemas/HttpError'
|
|---|
| 218 | description: Unauthorized (401) acces to resource
|
|---|
| [13cbe66] | 219 | 404:
|
|---|
| 220 | content:
|
|---|
| 221 | application/json:
|
|---|
| 222 | examples:
|
|---|
| 223 | HttpError:
|
|---|
| 224 | $ref: '#/components/examples/HttpError'
|
|---|
| 225 | schema:
|
|---|
| 226 | $ref: '#/components/schemas/HttpError'
|
|---|
| 227 | description: Water with given Id not found
|
|---|
| [be25db1] | 228 | security:
|
|---|
| 229 | - basicAuth: []
|
|---|
| 230 | summary: Deletes API key
|
|---|
| 231 | tags:
|
|---|
| 232 | - users
|
|---|
| 233 | x-openapi-router-controller: openapi_server.controllers.users_controller
|
|---|
| [3a89adb] | 234 | /waters:
|
|---|
| 235 | get:
|
|---|
| 236 | description: Returns all waters
|
|---|
| 237 | operationId: waters_get
|
|---|
| 238 | parameters:
|
|---|
| [be25db1] | 239 | - example: Missi
|
|---|
| 240 | explode: true
|
|---|
| 241 | in: query
|
|---|
| [3a89adb] | 242 | name: name
|
|---|
| 243 | required: false
|
|---|
| 244 | schema:
|
|---|
| [041e464] | 245 | $ref: '#/components/schemas/itemName'
|
|---|
| [be25db1] | 246 | style: form
|
|---|
| 247 | - example: jane
|
|---|
| 248 | explode: true
|
|---|
| 249 | in: query
|
|---|
| [3a89adb] | 250 | name: manager
|
|---|
| 251 | required: false
|
|---|
| 252 | schema:
|
|---|
| 253 | $ref: '#/components/schemas/username'
|
|---|
| [be25db1] | 254 | style: form
|
|---|
| [3a89adb] | 255 | - description: 'Order by field: name'
|
|---|
| 256 | explode: true
|
|---|
| 257 | in: query
|
|---|
| 258 | name: orderBy
|
|---|
| 259 | required: false
|
|---|
| 260 | schema:
|
|---|
| 261 | default: name
|
|---|
| [be25db1] | 262 | example: name
|
|---|
| [3a89adb] | 263 | type: string
|
|---|
| 264 | style: form
|
|---|
| [13cbe66] | 265 | - description: Skip over a number of elements by specifying an offset value
|
|---|
| 266 | for the query
|
|---|
| [3a89adb] | 267 | explode: true
|
|---|
| 268 | in: query
|
|---|
| 269 | name: offset
|
|---|
| 270 | required: false
|
|---|
| 271 | schema:
|
|---|
| 272 | default: 0
|
|---|
| 273 | example: 0
|
|---|
| 274 | format: int32
|
|---|
| 275 | type: integer
|
|---|
| 276 | style: form
|
|---|
| 277 | - description: Limit the number of elements on the response
|
|---|
| 278 | explode: true
|
|---|
| 279 | in: query
|
|---|
| 280 | name: limit
|
|---|
| 281 | required: false
|
|---|
| 282 | schema:
|
|---|
| 283 | default: 10
|
|---|
| 284 | example: 10
|
|---|
| 285 | format: int32
|
|---|
| 286 | type: integer
|
|---|
| 287 | style: form
|
|---|
| 288 | responses:
|
|---|
| 289 | 200:
|
|---|
| 290 | content:
|
|---|
| 291 | application/json:
|
|---|
| 292 | examples:
|
|---|
| 293 | Waters:
|
|---|
| 294 | $ref: '#/components/examples/waters'
|
|---|
| 295 | schema:
|
|---|
| 296 | $ref: '#/components/schemas/waters'
|
|---|
| 297 | description: OK
|
|---|
| [13cbe66] | 298 | 404:
|
|---|
| 299 | content:
|
|---|
| 300 | application/json:
|
|---|
| 301 | examples:
|
|---|
| 302 | HttpError:
|
|---|
| 303 | $ref: '#/components/examples/HttpError'
|
|---|
| 304 | schema:
|
|---|
| 305 | $ref: '#/components/schemas/HttpError'
|
|---|
| 306 | description: Water with given Id not found
|
|---|
| [3a89adb] | 307 | summary: Find waters by id
|
|---|
| 308 | tags:
|
|---|
| 309 | - waters
|
|---|
| 310 | x-openapi-router-controller: openapi_server.controllers.waters_controller
|
|---|
| 311 | post:
|
|---|
| 312 | description: Adds a new water to the database
|
|---|
| [be25db1] | 313 | operationId: waters_create
|
|---|
| [3a89adb] | 314 | requestBody:
|
|---|
| 315 | content:
|
|---|
| 316 | application/json:
|
|---|
| [041e464] | 317 | example:
|
|---|
| 318 | name: Rhein
|
|---|
| 319 | osmId: 1756854
|
|---|
| 320 | osmType: Relation
|
|---|
| [3a89adb] | 321 | schema:
|
|---|
| 322 | $ref: '#/components/schemas/WaterCreation'
|
|---|
| 323 | responses:
|
|---|
| 324 | 201:
|
|---|
| 325 | content:
|
|---|
| 326 | application/json:
|
|---|
| 327 | examples:
|
|---|
| 328 | Water:
|
|---|
| 329 | $ref: '#/components/examples/Water'
|
|---|
| 330 | schema:
|
|---|
| 331 | $ref: '#/components/schemas/Water'
|
|---|
| 332 | description: Water created
|
|---|
| 333 | 400:
|
|---|
| 334 | content:
|
|---|
| 335 | application/json:
|
|---|
| 336 | examples:
|
|---|
| 337 | HttpError:
|
|---|
| 338 | $ref: '#/components/examples/HttpError'
|
|---|
| 339 | schema:
|
|---|
| 340 | $ref: '#/components/schemas/HttpError'
|
|---|
| 341 | description: Bad Request (400)
|
|---|
| 342 | 401:
|
|---|
| 343 | content:
|
|---|
| 344 | application/json:
|
|---|
| 345 | examples:
|
|---|
| 346 | HttpError:
|
|---|
| 347 | $ref: '#/components/examples/HttpError'
|
|---|
| 348 | schema:
|
|---|
| 349 | $ref: '#/components/schemas/HttpError'
|
|---|
| 350 | description: Unauthorized (401) acces to resource
|
|---|
| 351 | security:
|
|---|
| 352 | - basicAuth: []
|
|---|
| 353 | - apiKeyAuth: []
|
|---|
| 354 | summary: Add a new water
|
|---|
| 355 | tags:
|
|---|
| 356 | - waters
|
|---|
| 357 | x-openapi-router-controller: openapi_server.controllers.waters_controller
|
|---|
| 358 | /waters/{id}:
|
|---|
| 359 | get:
|
|---|
| 360 | description: Returns the water identified by id
|
|---|
| [13cbe66] | 361 | operationId: waters_get_by_id
|
|---|
| [3a89adb] | 362 | parameters:
|
|---|
| 363 | - description: Item ID
|
|---|
| 364 | explode: false
|
|---|
| 365 | in: path
|
|---|
| 366 | name: id
|
|---|
| 367 | required: true
|
|---|
| 368 | schema:
|
|---|
| [041e464] | 369 | $ref: '#/components/schemas/itemId'
|
|---|
| [3a89adb] | 370 | style: simple
|
|---|
| 371 | responses:
|
|---|
| 372 | 200:
|
|---|
| 373 | content:
|
|---|
| 374 | application/json:
|
|---|
| 375 | examples:
|
|---|
| 376 | Water:
|
|---|
| 377 | $ref: '#/components/examples/Water'
|
|---|
| 378 | schema:
|
|---|
| 379 | $ref: '#/components/schemas/Water'
|
|---|
| 380 | description: OK
|
|---|
| 381 | 404:
|
|---|
| 382 | content:
|
|---|
| 383 | application/json:
|
|---|
| 384 | examples:
|
|---|
| 385 | HttpError:
|
|---|
| 386 | $ref: '#/components/examples/HttpError'
|
|---|
| 387 | schema:
|
|---|
| 388 | $ref: '#/components/schemas/HttpError'
|
|---|
| 389 | description: Water with given Id not found
|
|---|
| 390 | summary: Represents a water
|
|---|
| 391 | tags:
|
|---|
| 392 | - waters
|
|---|
| 393 | x-openapi-router-controller: openapi_server.controllers.waters_controller
|
|---|
| [13cbe66] | 394 | /waters/{water_id}/gauges:
|
|---|
| 395 | get:
|
|---|
| 396 | description: Returns all gauges of water waterId
|
|---|
| 397 | operationId: waters_gauges_get
|
|---|
| 398 | parameters:
|
|---|
| 399 | - description: Water ID
|
|---|
| 400 | explode: false
|
|---|
| 401 | in: path
|
|---|
| 402 | name: water_id
|
|---|
| 403 | required: true
|
|---|
| 404 | schema:
|
|---|
| 405 | $ref: '#/components/schemas/itemId'
|
|---|
| 406 | style: simple
|
|---|
| 407 | - example: Missi
|
|---|
| 408 | explode: true
|
|---|
| 409 | in: query
|
|---|
| 410 | name: name
|
|---|
| 411 | required: false
|
|---|
| 412 | schema:
|
|---|
| 413 | $ref: '#/components/schemas/itemName'
|
|---|
| 414 | style: form
|
|---|
| 415 | - example: jane
|
|---|
| 416 | explode: true
|
|---|
| 417 | in: query
|
|---|
| 418 | name: manager
|
|---|
| 419 | required: false
|
|---|
| 420 | schema:
|
|---|
| 421 | $ref: '#/components/schemas/username'
|
|---|
| 422 | style: form
|
|---|
| 423 | - description: 'Order by field: name'
|
|---|
| 424 | explode: true
|
|---|
| 425 | in: query
|
|---|
| 426 | name: orderBy
|
|---|
| 427 | required: false
|
|---|
| 428 | schema:
|
|---|
| 429 | default: name
|
|---|
| 430 | example: name
|
|---|
| 431 | type: string
|
|---|
| 432 | style: form
|
|---|
| 433 | - description: Skip over a number of elements by specifying an offset value
|
|---|
| 434 | for the query
|
|---|
| 435 | explode: true
|
|---|
| 436 | in: query
|
|---|
| 437 | name: offset
|
|---|
| 438 | required: false
|
|---|
| 439 | schema:
|
|---|
| 440 | default: 0
|
|---|
| 441 | example: 0
|
|---|
| 442 | format: int32
|
|---|
| 443 | type: integer
|
|---|
| 444 | style: form
|
|---|
| 445 | - description: Limit the number of elements on the response
|
|---|
| 446 | explode: true
|
|---|
| 447 | in: query
|
|---|
| 448 | name: limit
|
|---|
| 449 | required: false
|
|---|
| 450 | schema:
|
|---|
| 451 | default: 10
|
|---|
| 452 | example: 10
|
|---|
| 453 | format: int32
|
|---|
| 454 | type: integer
|
|---|
| 455 | style: form
|
|---|
| 456 | responses:
|
|---|
| 457 | 200:
|
|---|
| 458 | content:
|
|---|
| 459 | application/json:
|
|---|
| 460 | examples:
|
|---|
| 461 | Gauges:
|
|---|
| 462 | $ref: '#/components/examples/Gauges'
|
|---|
| 463 | schema:
|
|---|
| 464 | $ref: '#/components/schemas/Gauges'
|
|---|
| 465 | application/geo+json:
|
|---|
| 466 | examples:
|
|---|
| 467 | Gauge:
|
|---|
| 468 | $ref: '#/components/examples/GaugesGeoJson'
|
|---|
| 469 | schema:
|
|---|
| 470 | $ref: '#/components/schemas/GaugesGeoJson'
|
|---|
| 471 | description: OK
|
|---|
| 472 | summary: Find gauges of water waterId by gaugeId
|
|---|
| 473 | tags:
|
|---|
| 474 | - waters
|
|---|
| 475 | x-openapi-router-controller: openapi_server.controllers.waters_controller
|
|---|
| 476 | post:
|
|---|
| 477 | description: Adds a new gauge for water waterId to the database
|
|---|
| 478 | operationId: waters_gauge_create
|
|---|
| 479 | parameters:
|
|---|
| 480 | - description: Water ID
|
|---|
| 481 | explode: false
|
|---|
| 482 | in: path
|
|---|
| 483 | name: water_id
|
|---|
| 484 | required: true
|
|---|
| 485 | schema:
|
|---|
| 486 | $ref: '#/components/schemas/itemId'
|
|---|
| 487 | style: simple
|
|---|
| 488 | requestBody:
|
|---|
| 489 | content:
|
|---|
| 490 | application/json:
|
|---|
| 491 | example:
|
|---|
| 492 | name: New Orleans
|
|---|
| 493 | location:
|
|---|
| 494 | - 90.136111
|
|---|
| 495 | - 29.934722
|
|---|
| 496 | schema:
|
|---|
| 497 | $ref: '#/components/schemas/GaugeCreation'
|
|---|
| 498 | responses:
|
|---|
| 499 | 201:
|
|---|
| 500 | content:
|
|---|
| 501 | application/json:
|
|---|
| 502 | examples:
|
|---|
| 503 | Gauge:
|
|---|
| 504 | $ref: '#/components/examples/Gauge'
|
|---|
| 505 | schema:
|
|---|
| 506 | $ref: '#/components/schemas/Gauge'
|
|---|
| 507 | application/geo+json:
|
|---|
| 508 | examples:
|
|---|
| 509 | Gauge:
|
|---|
| 510 | $ref: '#/components/examples/GaugeGeoJson'
|
|---|
| 511 | schema:
|
|---|
| 512 | $ref: '#/components/schemas/GaugeGeoJson'
|
|---|
| 513 | description: Gauge created
|
|---|
| 514 | 400:
|
|---|
| 515 | content:
|
|---|
| 516 | application/json:
|
|---|
| 517 | examples:
|
|---|
| 518 | HttpError:
|
|---|
| 519 | $ref: '#/components/examples/HttpError'
|
|---|
| 520 | schema:
|
|---|
| 521 | $ref: '#/components/schemas/HttpError'
|
|---|
| 522 | description: Bad Request (400)
|
|---|
| 523 | 401:
|
|---|
| 524 | content:
|
|---|
| 525 | application/json:
|
|---|
| 526 | examples:
|
|---|
| 527 | HttpError:
|
|---|
| 528 | $ref: '#/components/examples/HttpError'
|
|---|
| 529 | schema:
|
|---|
| 530 | $ref: '#/components/schemas/HttpError'
|
|---|
| 531 | description: Unauthorized (401) acces to resource
|
|---|
| 532 | security:
|
|---|
| 533 | - basicAuth: []
|
|---|
| 534 | - apiKeyAuth: []
|
|---|
| 535 | summary: Add a new water
|
|---|
| 536 | tags:
|
|---|
| 537 | - waters
|
|---|
| 538 | x-openapi-router-controller: openapi_server.controllers.waters_controller
|
|---|
| 539 | /waters/{water_id}/gauges/{gauge_id}:
|
|---|
| 540 | get:
|
|---|
| 541 | description: Returns the gauge identified by id
|
|---|
| 542 | operationId: waters_gauge_get_by_id
|
|---|
| 543 | parameters:
|
|---|
| 544 | - description: Water ID
|
|---|
| 545 | explode: false
|
|---|
| 546 | in: path
|
|---|
| 547 | name: water_id
|
|---|
| 548 | required: true
|
|---|
| 549 | schema:
|
|---|
| 550 | $ref: '#/components/schemas/itemId'
|
|---|
| 551 | style: simple
|
|---|
| 552 | - description: Gauge ID
|
|---|
| 553 | explode: false
|
|---|
| 554 | in: path
|
|---|
| 555 | name: gauge_id
|
|---|
| 556 | required: true
|
|---|
| 557 | schema:
|
|---|
| 558 | $ref: '#/components/schemas/itemId'
|
|---|
| 559 | style: simple
|
|---|
| 560 | responses:
|
|---|
| 561 | 200:
|
|---|
| 562 | content:
|
|---|
| 563 | application/json:
|
|---|
| 564 | examples:
|
|---|
| 565 | Gauge:
|
|---|
| 566 | $ref: '#/components/examples/Gauge'
|
|---|
| 567 | schema:
|
|---|
| 568 | $ref: '#/components/schemas/Gauge'
|
|---|
| 569 | application/geo+json:
|
|---|
| 570 | examples:
|
|---|
| 571 | Gauge:
|
|---|
| 572 | $ref: '#/components/examples/GaugeGeoJson'
|
|---|
| 573 | schema:
|
|---|
| 574 | $ref: '#/components/schemas/GaugeGeoJson'
|
|---|
| 575 | description: OK
|
|---|
| 576 | 400:
|
|---|
| 577 | content:
|
|---|
| 578 | application/json:
|
|---|
| 579 | examples:
|
|---|
| 580 | HttpError:
|
|---|
| 581 | $ref: '#/components/examples/HttpError'
|
|---|
| 582 | schema:
|
|---|
| 583 | $ref: '#/components/schemas/HttpError'
|
|---|
| 584 | description: Bad Request (400)
|
|---|
| 585 | 404:
|
|---|
| 586 | content:
|
|---|
| 587 | application/json:
|
|---|
| 588 | examples:
|
|---|
| 589 | HttpError:
|
|---|
| 590 | $ref: '#/components/examples/HttpError'
|
|---|
| 591 | schema:
|
|---|
| 592 | $ref: '#/components/schemas/HttpError'
|
|---|
| 593 | description: Water with given Id not found
|
|---|
| 594 | summary: Represents a gauge
|
|---|
| 595 | tags:
|
|---|
| 596 | - waters
|
|---|
| 597 | x-openapi-router-controller: openapi_server.controllers.waters_controller
|
|---|
| [3a89adb] | 598 | components:
|
|---|
| 599 | examples:
|
|---|
| [be25db1] | 600 | User:
|
|---|
| 601 | value:
|
|---|
| 602 | username: jane
|
|---|
| 603 | email: jane@example.org
|
|---|
| 604 | firstName: Jane
|
|---|
| 605 | lastName: Doe
|
|---|
| 606 | activated: true
|
|---|
| 607 | apiKeys:
|
|---|
| 608 | - ApiKey4701
|
|---|
| 609 | UserCreation:
|
|---|
| 610 | value:
|
|---|
| 611 | username: richard
|
|---|
| 612 | email: richard@examle.org
|
|---|
| 613 | firstName: Richard
|
|---|
| 614 | lastName: Roe
|
|---|
| 615 | password: sdfl.1238_ASDkeil?
|
|---|
| [3a89adb] | 616 | Water:
|
|---|
| 617 | summary: A water example object
|
|---|
| 618 | value:
|
|---|
| [be25db1] | 619 | waterId: 1
|
|---|
| [3a89adb] | 620 | name: Mississippi
|
|---|
| [be25db1] | 621 | osmId: 1756854
|
|---|
| 622 | osmType: R
|
|---|
| [3a89adb] | 623 | WaterCreation:
|
|---|
| 624 | summary: A water example object for creation of a water
|
|---|
| 625 | value:
|
|---|
| 626 | name: Mississippi
|
|---|
| [be25db1] | 627 | osmId: 1756854
|
|---|
| [041e464] | 628 | osmType: Relation
|
|---|
| [3a89adb] | 629 | waters:
|
|---|
| 630 | summary: A sample list with waters
|
|---|
| 631 | value:
|
|---|
| [be25db1] | 632 | - waterId: 1
|
|---|
| [3a89adb] | 633 | name: Mississippi
|
|---|
| [be25db1] | 634 | osmId: 1756854
|
|---|
| [041e464] | 635 | osmType: Relation
|
|---|
| [be25db1] | 636 | - waterId: 2
|
|---|
| [3a89adb] | 637 | name: Bodensee
|
|---|
| [13cbe66] | 638 | Gauge:
|
|---|
| 639 | value:
|
|---|
| 640 | gaugeId: 1
|
|---|
| 641 | name: New Orleans
|
|---|
| 642 | manager: jane
|
|---|
| 643 | location:
|
|---|
| 644 | - 90.136111
|
|---|
| 645 | - 29.934722
|
|---|
| 646 | comment: Gauge for Mississippi in New Orleans
|
|---|
| 647 | Gauges:
|
|---|
| 648 | summary: A sample list of gauges
|
|---|
| 649 | value:
|
|---|
| 650 | - gaugeId: 1
|
|---|
| 651 | name: New Orleans
|
|---|
| 652 | manager: jane
|
|---|
| 653 | location:
|
|---|
| 654 | - 90.136111
|
|---|
| 655 | - 29.934722
|
|---|
| 656 | GaugeGeoJson:
|
|---|
| 657 | value:
|
|---|
| 658 | type: Feature
|
|---|
| 659 | geometry:
|
|---|
| 660 | type: Point
|
|---|
| 661 | coordinates:
|
|---|
| 662 | - 90.136111
|
|---|
| 663 | - 29.934722
|
|---|
| 664 | properties:
|
|---|
| 665 | name: New Orleans
|
|---|
| 666 | manager: jane
|
|---|
| 667 | comment: Gauge for Mississippi in New Orleans
|
|---|
| 668 | GaugesGeoJson:
|
|---|
| 669 | summary: A sample list of gauges in GeoJson format
|
|---|
| 670 | value:
|
|---|
| 671 | - type: Feature
|
|---|
| 672 | geometry:
|
|---|
| 673 | type: Point
|
|---|
| 674 | coordinates:
|
|---|
| 675 | - 90.136111
|
|---|
| 676 | - 29.934722
|
|---|
| 677 | properties:
|
|---|
| 678 | name: New Orleans
|
|---|
| 679 | manager: jane
|
|---|
| 680 | comment: Gauge for Mississippi in New Orleans
|
|---|
| [3a89adb] | 681 | HttpError:
|
|---|
| 682 | value:
|
|---|
| 683 | code: 404
|
|---|
| 684 | message: Water with id 999999 not found
|
|---|
| 685 | parameters:
|
|---|
| 686 | orderBy:
|
|---|
| 687 | description: 'Order by field: name'
|
|---|
| 688 | explode: true
|
|---|
| 689 | in: query
|
|---|
| 690 | name: orderBy
|
|---|
| 691 | required: false
|
|---|
| 692 | schema:
|
|---|
| 693 | default: name
|
|---|
| [be25db1] | 694 | example: name
|
|---|
| [3a89adb] | 695 | type: string
|
|---|
| 696 | style: form
|
|---|
| 697 | order:
|
|---|
| 698 | description: Order
|
|---|
| 699 | explode: true
|
|---|
| 700 | in: query
|
|---|
| 701 | name: order
|
|---|
| 702 | required: false
|
|---|
| 703 | schema:
|
|---|
| 704 | $ref: '#/components/schemas/order'
|
|---|
| 705 | style: form
|
|---|
| 706 | offset:
|
|---|
| [13cbe66] | 707 | description: Skip over a number of elements by specifying an offset value for
|
|---|
| 708 | the query
|
|---|
| [3a89adb] | 709 | explode: true
|
|---|
| 710 | in: query
|
|---|
| 711 | name: offset
|
|---|
| 712 | required: false
|
|---|
| 713 | schema:
|
|---|
| 714 | default: 0
|
|---|
| 715 | example: 0
|
|---|
| 716 | format: int32
|
|---|
| 717 | type: integer
|
|---|
| 718 | style: form
|
|---|
| 719 | limit:
|
|---|
| 720 | description: Limit the number of elements on the response
|
|---|
| 721 | explode: true
|
|---|
| 722 | in: query
|
|---|
| 723 | name: limit
|
|---|
| 724 | required: false
|
|---|
| 725 | schema:
|
|---|
| 726 | default: 10
|
|---|
| 727 | example: 10
|
|---|
| 728 | format: int32
|
|---|
| 729 | type: integer
|
|---|
| 730 | style: form
|
|---|
| 731 | responses:
|
|---|
| 732 | BadRequest:
|
|---|
| 733 | content:
|
|---|
| 734 | application/json:
|
|---|
| 735 | examples:
|
|---|
| 736 | HttpError:
|
|---|
| 737 | $ref: '#/components/examples/HttpError'
|
|---|
| 738 | schema:
|
|---|
| 739 | $ref: '#/components/schemas/HttpError'
|
|---|
| 740 | description: Bad Request (400)
|
|---|
| 741 | Unauthorized:
|
|---|
| 742 | content:
|
|---|
| 743 | application/json:
|
|---|
| 744 | examples:
|
|---|
| 745 | HttpError:
|
|---|
| 746 | $ref: '#/components/examples/HttpError'
|
|---|
| 747 | schema:
|
|---|
| 748 | $ref: '#/components/schemas/HttpError'
|
|---|
| 749 | description: Unauthorized (401) acces to resource
|
|---|
| 750 | NotFound:
|
|---|
| 751 | content:
|
|---|
| 752 | application/json:
|
|---|
| 753 | examples:
|
|---|
| 754 | HttpError:
|
|---|
| 755 | $ref: '#/components/examples/HttpError'
|
|---|
| 756 | schema:
|
|---|
| 757 | $ref: '#/components/schemas/HttpError'
|
|---|
| 758 | description: Water with given Id not found
|
|---|
| 759 | schemas:
|
|---|
| 760 | username:
|
|---|
| 761 | title: Username
|
|---|
| 762 | type: string
|
|---|
| [be25db1] | 763 | apiKey:
|
|---|
| 764 | title: API Key
|
|---|
| 765 | type: string
|
|---|
| 766 | apiKeys:
|
|---|
| 767 | items:
|
|---|
| 768 | $ref: '#/components/schemas/apiKey'
|
|---|
| 769 | title: Array of API keys
|
|---|
| 770 | type: array
|
|---|
| 771 | activationCode:
|
|---|
| 772 | title: Activation code for a User
|
|---|
| 773 | type: string
|
|---|
| [041e464] | 774 | itemId:
|
|---|
| [3a89adb] | 775 | format: int32
|
|---|
| 776 | title: Item ID
|
|---|
| 777 | type: integer
|
|---|
| [041e464] | 778 | itemName:
|
|---|
| [3a89adb] | 779 | title: Item Name
|
|---|
| 780 | type: string
|
|---|
| [13cbe66] | 781 | order:
|
|---|
| 782 | default: asc
|
|---|
| 783 | description: |
|
|---|
| 784 | Sort order:
|
|---|
| 785 | * `asc` - Ascending, from A to Z
|
|---|
| 786 | * `desc` - Descending, from Z to A
|
|---|
| 787 | enum:
|
|---|
| 788 | - desc
|
|---|
| 789 | - asc
|
|---|
| 790 | example: asc
|
|---|
| 791 | title: order
|
|---|
| 792 | type: string
|
|---|
| [be25db1] | 793 | osmType:
|
|---|
| [041e464] | 794 | enum:
|
|---|
| 795 | - Node
|
|---|
| 796 | - Way
|
|---|
| 797 | - Relation
|
|---|
| 798 | title: OSM type of item (N|W|R)
|
|---|
| [3a89adb] | 799 | type: string
|
|---|
| [13cbe66] | 800 | comment:
|
|---|
| 801 | title: Comment of an item
|
|---|
| 802 | type: string
|
|---|
| 803 | point:
|
|---|
| 804 | items:
|
|---|
| 805 | type: number
|
|---|
| 806 | maxItems: 2
|
|---|
| 807 | minItems: 2
|
|---|
| 808 | title: Point of type [longitude, latitude]
|
|---|
| 809 | type: array
|
|---|
| 810 | geoJsonType:
|
|---|
| 811 | enum:
|
|---|
| 812 | - Feature
|
|---|
| 813 | - Point
|
|---|
| 814 | title: Type of GeoJSON objects
|
|---|
| 815 | type: string
|
|---|
| 816 | geoJsonPoint:
|
|---|
| 817 | description: GeoJSon geometry
|
|---|
| 818 | externalDocs:
|
|---|
| 819 | url: http://geojson.org/geojson-spec.html#id2
|
|---|
| 820 | properties:
|
|---|
| 821 | type:
|
|---|
| 822 | type: string
|
|---|
| 823 | coordinates:
|
|---|
| 824 | items:
|
|---|
| 825 | type: number
|
|---|
| 826 | maxItems: 2
|
|---|
| 827 | minItems: 2
|
|---|
| 828 | title: Point of type [longitude, latitude]
|
|---|
| 829 | type: array
|
|---|
| 830 | type: object
|
|---|
| [be25db1] | 831 | User:
|
|---|
| 832 | example:
|
|---|
| 833 | firstName: firstName
|
|---|
| 834 | lastName: lastName
|
|---|
| 835 | apiKeys:
|
|---|
| 836 | - null
|
|---|
| 837 | - null
|
|---|
| 838 | email: email
|
|---|
| 839 | username: username
|
|---|
| 840 | activated: true
|
|---|
| 841 | properties:
|
|---|
| 842 | username:
|
|---|
| 843 | title: Username
|
|---|
| 844 | type: string
|
|---|
| 845 | email:
|
|---|
| 846 | type: string
|
|---|
| 847 | firstName:
|
|---|
| 848 | type: string
|
|---|
| 849 | lastName:
|
|---|
| 850 | type: string
|
|---|
| 851 | activated:
|
|---|
| 852 | type: boolean
|
|---|
| 853 | apiKeys:
|
|---|
| 854 | items:
|
|---|
| 855 | $ref: '#/components/schemas/apiKey'
|
|---|
| 856 | title: Array of API keys
|
|---|
| 857 | type: array
|
|---|
| 858 | title: User
|
|---|
| 859 | type: object
|
|---|
| 860 | UserCreation:
|
|---|
| 861 | example:
|
|---|
| 862 | firstName: firstName
|
|---|
| 863 | lastName: lastName
|
|---|
| 864 | password: password
|
|---|
| 865 | email: email
|
|---|
| 866 | username: username
|
|---|
| 867 | properties:
|
|---|
| 868 | username:
|
|---|
| 869 | title: Username
|
|---|
| 870 | type: string
|
|---|
| 871 | email:
|
|---|
| 872 | type: string
|
|---|
| 873 | firstName:
|
|---|
| 874 | type: string
|
|---|
| 875 | lastName:
|
|---|
| 876 | type: string
|
|---|
| 877 | password:
|
|---|
| 878 | type: string
|
|---|
| 879 | required:
|
|---|
| 880 | - email
|
|---|
| 881 | - firstName
|
|---|
| 882 | - lastName
|
|---|
| 883 | - password
|
|---|
| 884 | - username
|
|---|
| 885 | title: User
|
|---|
| 886 | type: object
|
|---|
| [3a89adb] | 887 | Water:
|
|---|
| 888 | example:
|
|---|
| 889 | manager: manager
|
|---|
| [be25db1] | 890 | osmId: 6
|
|---|
| [3a89adb] | 891 | name: name
|
|---|
| [13cbe66] | 892 | gauges:
|
|---|
| 893 | - manager: manager
|
|---|
| 894 | name: name
|
|---|
| 895 | location:
|
|---|
| 896 | - 5.962133916683182
|
|---|
| 897 | - 5.962133916683182
|
|---|
| 898 | comment: comment
|
|---|
| 899 | gaugeId: 1
|
|---|
| 900 | - manager: manager
|
|---|
| 901 | name: name
|
|---|
| 902 | location:
|
|---|
| 903 | - 5.962133916683182
|
|---|
| 904 | - 5.962133916683182
|
|---|
| 905 | comment: comment
|
|---|
| 906 | gaugeId: 1
|
|---|
| [be25db1] | 907 | waterId: 0
|
|---|
| [3a89adb] | 908 | properties:
|
|---|
| [be25db1] | 909 | waterId:
|
|---|
| [3a89adb] | 910 | format: int32
|
|---|
| 911 | title: Item ID
|
|---|
| 912 | type: integer
|
|---|
| 913 | name:
|
|---|
| 914 | title: Item Name
|
|---|
| 915 | type: string
|
|---|
| 916 | manager:
|
|---|
| 917 | title: Username
|
|---|
| 918 | type: string
|
|---|
| [be25db1] | 919 | osmId:
|
|---|
| [3a89adb] | 920 | format: int32
|
|---|
| 921 | title: Item ID
|
|---|
| 922 | type: integer
|
|---|
| [be25db1] | 923 | osmType:
|
|---|
| [041e464] | 924 | $ref: '#/components/schemas/osmType'
|
|---|
| [13cbe66] | 925 | gauges:
|
|---|
| 926 | items:
|
|---|
| 927 | $ref: '#/components/schemas/Gauge'
|
|---|
| 928 | title: Gauges
|
|---|
| 929 | type: array
|
|---|
| [3a89adb] | 930 | required:
|
|---|
| 931 | - name
|
|---|
| [be25db1] | 932 | - waterId
|
|---|
| [3a89adb] | 933 | title: Water
|
|---|
| 934 | type: object
|
|---|
| 935 | WaterCreation:
|
|---|
| 936 | example:
|
|---|
| [be25db1] | 937 | osmId: 0
|
|---|
| [3a89adb] | 938 | name: name
|
|---|
| 939 | properties:
|
|---|
| 940 | name:
|
|---|
| 941 | title: Item Name
|
|---|
| 942 | type: string
|
|---|
| [be25db1] | 943 | osmId:
|
|---|
| [3a89adb] | 944 | format: int32
|
|---|
| 945 | title: Item ID
|
|---|
| 946 | type: integer
|
|---|
| [be25db1] | 947 | osmType:
|
|---|
| [041e464] | 948 | $ref: '#/components/schemas/osmType'
|
|---|
| [3a89adb] | 949 | required:
|
|---|
| 950 | - name
|
|---|
| 951 | title: Water
|
|---|
| 952 | type: object
|
|---|
| 953 | waters:
|
|---|
| 954 | items:
|
|---|
| 955 | $ref: '#/components/schemas/Water'
|
|---|
| 956 | title: waters
|
|---|
| 957 | type: array
|
|---|
| [13cbe66] | 958 | Gauge:
|
|---|
| 959 | example:
|
|---|
| 960 | manager: manager
|
|---|
| 961 | name: name
|
|---|
| 962 | location:
|
|---|
| 963 | - 5.962133916683182
|
|---|
| 964 | - 5.962133916683182
|
|---|
| 965 | comment: comment
|
|---|
| 966 | gaugeId: 1
|
|---|
| 967 | properties:
|
|---|
| 968 | gaugeId:
|
|---|
| 969 | format: int32
|
|---|
| 970 | title: Item ID
|
|---|
| 971 | type: integer
|
|---|
| 972 | name:
|
|---|
| 973 | title: Item Name
|
|---|
| 974 | type: string
|
|---|
| 975 | manager:
|
|---|
| 976 | title: Username
|
|---|
| 977 | type: string
|
|---|
| 978 | location:
|
|---|
| 979 | items:
|
|---|
| 980 | type: number
|
|---|
| 981 | maxItems: 2
|
|---|
| 982 | minItems: 2
|
|---|
| 983 | title: Point of type [longitude, latitude]
|
|---|
| 984 | type: array
|
|---|
| 985 | comment:
|
|---|
| 986 | title: Comment of an item
|
|---|
| 987 | type: string
|
|---|
| 988 | required:
|
|---|
| 989 | - gaugeId
|
|---|
| 990 | - location
|
|---|
| 991 | - name
|
|---|
| 992 | title: Gauge
|
|---|
| 993 | type: object
|
|---|
| 994 | GaugeCreation:
|
|---|
| 995 | example:
|
|---|
| 996 | name: name
|
|---|
| 997 | location:
|
|---|
| 998 | - 0.8008281904610115
|
|---|
| 999 | - 0.8008281904610115
|
|---|
| 1000 | comment: comment
|
|---|
| 1001 | properties:
|
|---|
| 1002 | name:
|
|---|
| 1003 | title: Item Name
|
|---|
| 1004 | type: string
|
|---|
| 1005 | location:
|
|---|
| 1006 | items:
|
|---|
| 1007 | type: number
|
|---|
| 1008 | maxItems: 2
|
|---|
| 1009 | minItems: 2
|
|---|
| 1010 | title: Point of type [longitude, latitude]
|
|---|
| 1011 | type: array
|
|---|
| 1012 | comment:
|
|---|
| 1013 | title: Comment of an item
|
|---|
| 1014 | type: string
|
|---|
| 1015 | required:
|
|---|
| 1016 | - location
|
|---|
| 1017 | - name
|
|---|
| 1018 | title: Gauge for Creation
|
|---|
| 1019 | type: object
|
|---|
| 1020 | Gauges:
|
|---|
| 1021 | items:
|
|---|
| 1022 | $ref: '#/components/schemas/Gauge'
|
|---|
| 1023 | title: Gauges
|
|---|
| 1024 | type: array
|
|---|
| 1025 | GaugeGeoJson:
|
|---|
| 1026 | properties:
|
|---|
| 1027 | type:
|
|---|
| 1028 | $ref: '#/components/schemas/geoJsonType'
|
|---|
| 1029 | geometry:
|
|---|
| 1030 | $ref: '#/components/schemas/geoJsonPoint'
|
|---|
| 1031 | properties:
|
|---|
| 1032 | $ref: '#/components/schemas/GaugeGeoJson_properties'
|
|---|
| 1033 | required:
|
|---|
| 1034 | - geometry
|
|---|
| 1035 | - properties
|
|---|
| 1036 | - type
|
|---|
| 1037 | title: Gauge
|
|---|
| 1038 | type: object
|
|---|
| 1039 | GaugesGeoJson:
|
|---|
| 1040 | items:
|
|---|
| 1041 | $ref: '#/components/schemas/GaugeGeoJson'
|
|---|
| 1042 | title: Gauges in GeoJson format
|
|---|
| 1043 | type: array
|
|---|
| [3a89adb] | 1044 | HttpError:
|
|---|
| 1045 | properties:
|
|---|
| 1046 | code:
|
|---|
| 1047 | type: integer
|
|---|
| 1048 | message:
|
|---|
| 1049 | type: string
|
|---|
| 1050 | required:
|
|---|
| 1051 | - code
|
|---|
| 1052 | - message
|
|---|
| 1053 | title: HTTP Error Response Object
|
|---|
| 1054 | type: object
|
|---|
| [13cbe66] | 1055 | GaugeGeoJson_properties:
|
|---|
| 1056 | properties:
|
|---|
| 1057 | name:
|
|---|
| 1058 | title: Item Name
|
|---|
| 1059 | type: string
|
|---|
| 1060 | manager:
|
|---|
| 1061 | title: Username
|
|---|
| 1062 | type: string
|
|---|
| 1063 | comment:
|
|---|
| 1064 | title: Comment of an item
|
|---|
| 1065 | type: string
|
|---|
| 1066 | required:
|
|---|
| 1067 | - name
|
|---|
| [3a89adb] | 1068 | securitySchemes:
|
|---|
| 1069 | basicAuth:
|
|---|
| 1070 | scheme: basic
|
|---|
| 1071 | type: http
|
|---|
| 1072 | x-basicInfoFunc: openapi_server.server_impl.security.Security.auth_basic
|
|---|
| 1073 | apiKeyAuth:
|
|---|
| 1074 | in: header
|
|---|
| 1075 | name: X-API-KEY
|
|---|
| 1076 | type: apiKey
|
|---|
| 1077 | x-apikeyInfoFunc: openapi_server.server_impl.security.Security.auth_api
|
|---|