| [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:
|
|---|
| 25 | - description: A water is a river (like Mississippi, lake (Lake Ontario), or a sea (North Sea)
|
|---|
| 26 | name: waters
|
|---|
| 27 | paths:
|
|---|
| 28 | /waters:
|
|---|
| 29 | get:
|
|---|
| 30 | description: Returns all waters
|
|---|
| 31 | operationId: waters_get
|
|---|
| 32 | parameters:
|
|---|
| 33 | - explode: false
|
|---|
| 34 | in: header
|
|---|
| 35 | name: name
|
|---|
| 36 | required: false
|
|---|
| 37 | schema:
|
|---|
| 38 | $ref: '#/components/schemas/item_name'
|
|---|
| 39 | style: simple
|
|---|
| 40 | - explode: false
|
|---|
| 41 | in: header
|
|---|
| 42 | name: manager
|
|---|
| 43 | required: false
|
|---|
| 44 | schema:
|
|---|
| 45 | $ref: '#/components/schemas/username'
|
|---|
| 46 | style: simple
|
|---|
| 47 | - description: 'Order by field: name'
|
|---|
| 48 | explode: true
|
|---|
| 49 | in: query
|
|---|
| 50 | name: orderBy
|
|---|
| 51 | required: false
|
|---|
| 52 | schema:
|
|---|
| 53 | default: name
|
|---|
| 54 | type: string
|
|---|
| 55 | style: form
|
|---|
| 56 | - description: Skip over a number of elements by specifying an offset value for the query
|
|---|
| 57 | explode: true
|
|---|
| 58 | in: query
|
|---|
| 59 | name: offset
|
|---|
| 60 | required: false
|
|---|
| 61 | schema:
|
|---|
| 62 | default: 0
|
|---|
| 63 | example: 0
|
|---|
| 64 | format: int32
|
|---|
| 65 | type: integer
|
|---|
| 66 | style: form
|
|---|
| 67 | - description: Limit the number of elements on the response
|
|---|
| 68 | explode: true
|
|---|
| 69 | in: query
|
|---|
| 70 | name: limit
|
|---|
| 71 | required: false
|
|---|
| 72 | schema:
|
|---|
| 73 | default: 10
|
|---|
| 74 | example: 10
|
|---|
| 75 | format: int32
|
|---|
| 76 | type: integer
|
|---|
| 77 | style: form
|
|---|
| 78 | responses:
|
|---|
| 79 | 200:
|
|---|
| 80 | content:
|
|---|
| 81 | application/json:
|
|---|
| 82 | examples:
|
|---|
| 83 | Waters:
|
|---|
| 84 | $ref: '#/components/examples/waters'
|
|---|
| 85 | schema:
|
|---|
| 86 | $ref: '#/components/schemas/waters'
|
|---|
| 87 | description: OK
|
|---|
| 88 | summary: Find waters by id
|
|---|
| 89 | tags:
|
|---|
| 90 | - waters
|
|---|
| 91 | x-openapi-router-controller: openapi_server.controllers.waters_controller
|
|---|
| 92 | post:
|
|---|
| 93 | description: Adds a new water to the database
|
|---|
| 94 | operationId: waters_post
|
|---|
| 95 | requestBody:
|
|---|
| 96 | content:
|
|---|
| 97 | application/json:
|
|---|
| 98 | examples:
|
|---|
| 99 | Water:
|
|---|
| 100 | $ref: '#/components/examples/WaterCreation'
|
|---|
| 101 | schema:
|
|---|
| 102 | $ref: '#/components/schemas/WaterCreation'
|
|---|
| 103 | description: item id of water is going to be ignored
|
|---|
| 104 | responses:
|
|---|
| 105 | 201:
|
|---|
| 106 | content:
|
|---|
| 107 | application/json:
|
|---|
| 108 | examples:
|
|---|
| 109 | Water:
|
|---|
| 110 | $ref: '#/components/examples/Water'
|
|---|
| 111 | schema:
|
|---|
| 112 | $ref: '#/components/schemas/Water'
|
|---|
| 113 | description: Water created
|
|---|
| 114 | 400:
|
|---|
| 115 | content:
|
|---|
| 116 | application/json:
|
|---|
| 117 | examples:
|
|---|
| 118 | HttpError:
|
|---|
| 119 | $ref: '#/components/examples/HttpError'
|
|---|
| 120 | schema:
|
|---|
| 121 | $ref: '#/components/schemas/HttpError'
|
|---|
| 122 | description: Bad Request (400)
|
|---|
| 123 | 401:
|
|---|
| 124 | content:
|
|---|
| 125 | application/json:
|
|---|
| 126 | examples:
|
|---|
| 127 | HttpError:
|
|---|
| 128 | $ref: '#/components/examples/HttpError'
|
|---|
| 129 | schema:
|
|---|
| 130 | $ref: '#/components/schemas/HttpError'
|
|---|
| 131 | description: Unauthorized (401) acces to resource
|
|---|
| 132 | security:
|
|---|
| 133 | - basicAuth: []
|
|---|
| 134 | - apiKeyAuth: []
|
|---|
| 135 | summary: Add a new water
|
|---|
| 136 | tags:
|
|---|
| 137 | - waters
|
|---|
| 138 | x-openapi-router-controller: openapi_server.controllers.waters_controller
|
|---|
| 139 | /waters/{id}:
|
|---|
| 140 | get:
|
|---|
| 141 | description: Returns the water identified by id
|
|---|
| 142 | operationId: water_get_by_id
|
|---|
| 143 | parameters:
|
|---|
| 144 | - description: Item ID
|
|---|
| 145 | explode: false
|
|---|
| 146 | in: path
|
|---|
| 147 | name: id
|
|---|
| 148 | required: true
|
|---|
| 149 | schema:
|
|---|
| 150 | $ref: '#/components/schemas/item_id'
|
|---|
| 151 | style: simple
|
|---|
| 152 | responses:
|
|---|
| 153 | 200:
|
|---|
| 154 | content:
|
|---|
| 155 | application/json:
|
|---|
| 156 | examples:
|
|---|
| 157 | Water:
|
|---|
| 158 | $ref: '#/components/examples/Water'
|
|---|
| 159 | schema:
|
|---|
| 160 | $ref: '#/components/schemas/Water'
|
|---|
| 161 | description: OK
|
|---|
| 162 | 404:
|
|---|
| 163 | content:
|
|---|
| 164 | application/json:
|
|---|
| 165 | examples:
|
|---|
| 166 | HttpError:
|
|---|
| 167 | $ref: '#/components/examples/HttpError'
|
|---|
| 168 | schema:
|
|---|
| 169 | $ref: '#/components/schemas/HttpError'
|
|---|
| 170 | description: Water with given Id not found
|
|---|
| 171 | summary: Represents a water
|
|---|
| 172 | tags:
|
|---|
| 173 | - waters
|
|---|
| 174 | x-openapi-router-controller: openapi_server.controllers.waters_controller
|
|---|
| 175 | components:
|
|---|
| 176 | examples:
|
|---|
| 177 | Water:
|
|---|
| 178 | summary: A water example object
|
|---|
| 179 | value:
|
|---|
| 180 | water_id: 1
|
|---|
| 181 | name: Mississippi
|
|---|
| 182 | osm_id: 1756854
|
|---|
| 183 | osm_type: R
|
|---|
| 184 | link: http://gnuboat.engsas.com/mapservice/v1/waters/1
|
|---|
| 185 | WaterCreation:
|
|---|
| 186 | summary: A water example object for creation of a water
|
|---|
| 187 | value:
|
|---|
| 188 | name: Mississippi
|
|---|
| 189 | osm_id: 1756854
|
|---|
| 190 | osm_type: R
|
|---|
| 191 | waters:
|
|---|
| 192 | summary: A sample list with waters
|
|---|
| 193 | value:
|
|---|
| 194 | - water_id: 1
|
|---|
| 195 | name: Mississippi
|
|---|
| 196 | osm_id: 1756854
|
|---|
| 197 | osm_type: R
|
|---|
| 198 | link: http://gnuboat.engsas.com/mapservice/v1/waters/1
|
|---|
| 199 | - water_id: 2
|
|---|
| 200 | name: Bodensee
|
|---|
| 201 | link: http://gnuboat.engsas.com/mapservice/v1/waters/2
|
|---|
| 202 | HttpError:
|
|---|
| 203 | value:
|
|---|
| 204 | code: 404
|
|---|
| 205 | message: Water with id 999999 not found
|
|---|
| 206 | parameters:
|
|---|
| 207 | orderBy:
|
|---|
| 208 | description: 'Order by field: name'
|
|---|
| 209 | explode: true
|
|---|
| 210 | in: query
|
|---|
| 211 | name: orderBy
|
|---|
| 212 | required: false
|
|---|
| 213 | schema:
|
|---|
| 214 | default: name
|
|---|
| 215 | type: string
|
|---|
| 216 | style: form
|
|---|
| 217 | order:
|
|---|
| 218 | description: Order
|
|---|
| 219 | explode: true
|
|---|
| 220 | in: query
|
|---|
| 221 | name: order
|
|---|
| 222 | required: false
|
|---|
| 223 | schema:
|
|---|
| 224 | $ref: '#/components/schemas/order'
|
|---|
| 225 | style: form
|
|---|
| 226 | offset:
|
|---|
| 227 | description: Skip over a number of elements by specifying an offset value for the query
|
|---|
| 228 | explode: true
|
|---|
| 229 | in: query
|
|---|
| 230 | name: offset
|
|---|
| 231 | required: false
|
|---|
| 232 | schema:
|
|---|
| 233 | default: 0
|
|---|
| 234 | example: 0
|
|---|
| 235 | format: int32
|
|---|
| 236 | type: integer
|
|---|
| 237 | style: form
|
|---|
| 238 | limit:
|
|---|
| 239 | description: Limit the number of elements on the response
|
|---|
| 240 | explode: true
|
|---|
| 241 | in: query
|
|---|
| 242 | name: limit
|
|---|
| 243 | required: false
|
|---|
| 244 | schema:
|
|---|
| 245 | default: 10
|
|---|
| 246 | example: 10
|
|---|
| 247 | format: int32
|
|---|
| 248 | type: integer
|
|---|
| 249 | style: form
|
|---|
| 250 | responses:
|
|---|
| 251 | BadRequest:
|
|---|
| 252 | content:
|
|---|
| 253 | application/json:
|
|---|
| 254 | examples:
|
|---|
| 255 | HttpError:
|
|---|
| 256 | $ref: '#/components/examples/HttpError'
|
|---|
| 257 | schema:
|
|---|
| 258 | $ref: '#/components/schemas/HttpError'
|
|---|
| 259 | description: Bad Request (400)
|
|---|
| 260 | Unauthorized:
|
|---|
| 261 | content:
|
|---|
| 262 | application/json:
|
|---|
| 263 | examples:
|
|---|
| 264 | HttpError:
|
|---|
| 265 | $ref: '#/components/examples/HttpError'
|
|---|
| 266 | schema:
|
|---|
| 267 | $ref: '#/components/schemas/HttpError'
|
|---|
| 268 | description: Unauthorized (401) acces to resource
|
|---|
| 269 | NotFound:
|
|---|
| 270 | content:
|
|---|
| 271 | application/json:
|
|---|
| 272 | examples:
|
|---|
| 273 | HttpError:
|
|---|
| 274 | $ref: '#/components/examples/HttpError'
|
|---|
| 275 | schema:
|
|---|
| 276 | $ref: '#/components/schemas/HttpError'
|
|---|
| 277 | description: Water with given Id not found
|
|---|
| 278 | schemas:
|
|---|
| 279 | username:
|
|---|
| 280 | title: Username
|
|---|
| 281 | type: string
|
|---|
| 282 | item_id:
|
|---|
| 283 | format: int32
|
|---|
| 284 | title: Item ID
|
|---|
| 285 | type: integer
|
|---|
| 286 | item_name:
|
|---|
| 287 | title: Item Name
|
|---|
| 288 | type: string
|
|---|
| 289 | osm_type:
|
|---|
| 290 | maxLength: 1
|
|---|
| 291 | minLength: 1
|
|---|
| 292 | type: string
|
|---|
| 293 | Water:
|
|---|
| 294 | example:
|
|---|
| 295 | osm_id: 6
|
|---|
| 296 | osm_type: osm_type
|
|---|
| 297 | manager: manager
|
|---|
| 298 | name: name
|
|---|
| 299 | water_id: 0
|
|---|
| 300 | osm_class: osm_class
|
|---|
| 301 | properties:
|
|---|
| 302 | water_id:
|
|---|
| 303 | format: int32
|
|---|
| 304 | title: Item ID
|
|---|
| 305 | type: integer
|
|---|
| 306 | name:
|
|---|
| 307 | title: Item Name
|
|---|
| 308 | type: string
|
|---|
| 309 | manager:
|
|---|
| 310 | title: Username
|
|---|
| 311 | type: string
|
|---|
| 312 | osm_id:
|
|---|
| 313 | format: int32
|
|---|
| 314 | title: Item ID
|
|---|
| 315 | type: integer
|
|---|
| 316 | osm_type:
|
|---|
| 317 | maxLength: 1
|
|---|
| 318 | minLength: 1
|
|---|
| 319 | type: string
|
|---|
| 320 | osm_class:
|
|---|
| 321 | maxLength: 1
|
|---|
| 322 | minLength: 1
|
|---|
| 323 | type: string
|
|---|
| 324 | required:
|
|---|
| 325 | - name
|
|---|
| 326 | - water_id
|
|---|
| 327 | title: Water
|
|---|
| 328 | type: object
|
|---|
| 329 | WaterCreation:
|
|---|
| 330 | example:
|
|---|
| 331 | osm_id: 0
|
|---|
| 332 | osm_type: osm_type
|
|---|
| 333 | name: name
|
|---|
| 334 | properties:
|
|---|
| 335 | name:
|
|---|
| 336 | title: Item Name
|
|---|
| 337 | type: string
|
|---|
| 338 | osm_id:
|
|---|
| 339 | format: int32
|
|---|
| 340 | title: Item ID
|
|---|
| 341 | type: integer
|
|---|
| 342 | osm_type:
|
|---|
| 343 | maxLength: 1
|
|---|
| 344 | minLength: 1
|
|---|
| 345 | type: string
|
|---|
| 346 | required:
|
|---|
| 347 | - name
|
|---|
| 348 | title: Water
|
|---|
| 349 | type: object
|
|---|
| 350 | waters:
|
|---|
| 351 | items:
|
|---|
| 352 | $ref: '#/components/schemas/Water'
|
|---|
| 353 | title: waters
|
|---|
| 354 | type: array
|
|---|
| 355 | order:
|
|---|
| 356 | default: asc
|
|---|
| 357 | description: |
|
|---|
| 358 | Sort order:
|
|---|
| 359 | * `asc` - Ascending, from A to Z
|
|---|
| 360 | * `desc` - Descending, from Z to A
|
|---|
| 361 | enum:
|
|---|
| 362 | - desc
|
|---|
| 363 | - asc
|
|---|
| 364 | example: asc
|
|---|
| 365 | title: order
|
|---|
| 366 | type: string
|
|---|
| 367 | HttpError:
|
|---|
| 368 | properties:
|
|---|
| 369 | code:
|
|---|
| 370 | format: int32
|
|---|
| 371 | type: integer
|
|---|
| 372 | message:
|
|---|
| 373 | type: string
|
|---|
| 374 | required:
|
|---|
| 375 | - code
|
|---|
| 376 | - message
|
|---|
| 377 | title: HTTP Error Response Object
|
|---|
| 378 | type: object
|
|---|
| 379 | securitySchemes:
|
|---|
| 380 | basicAuth:
|
|---|
| 381 | scheme: basic
|
|---|
| 382 | type: http
|
|---|
| 383 | x-basicInfoFunc: openapi_server.server_impl.security.Security.auth_basic
|
|---|
| 384 | apiKeyAuth:
|
|---|
| 385 | in: header
|
|---|
| 386 | name: X-API-KEY
|
|---|
| 387 | type: apiKey
|
|---|
| 388 | x-apikeyInfoFunc: openapi_server.server_impl.security.Security.auth_api
|
|---|