Changeset be25db1 for src/mapservice/openapi.yaml
- Timestamp:
- Apr 22, 2019, 5:39:46 PM (8 years ago)
- Branches:
- debian/bullseye, master
- Children:
- 041e464
- Parents:
- 5e4cb73
- File:
-
- 1 edited
-
src/mapservice/openapi.yaml (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/mapservice/openapi.yaml
r5e4cb73 rbe25db1 23 23 default: v1 24 24 paths: 25 '/user': 26 get: 27 description: Returns information for a user 28 tags: 29 - users 30 summary: Returns info of a user 31 operationId: usersGet 32 security: 33 - basicAuth: [] 34 - apiKeyAuth: [] 35 responses: 36 '200': 37 description: OK 38 content: 39 application/json: 40 schema: 41 $ref: '#/components/schemas/User' 42 examples: 43 User: 44 $ref: '#/components/examples/User' 45 '400': 46 $ref: '#/components/responses/BadRequest' 47 '401': 48 $ref: '#/components/responses/Unauthorized' 49 post: 50 description: Registers a new user 51 tags: 52 - users 53 summary: Registers a new user 54 operationId: usersRegister 55 requestBody: 56 content: 57 application/json: 58 schema: 59 $ref: '#/components/schemas/UserCreation' 60 examples: 61 Water: 62 $ref: '#/components/examples/UserCreation' 63 responses: 64 '201': 65 description: Userr created 66 content: 67 application/json: 68 schema: 69 $ref: '#/components/schemas/User' 70 examples: 71 Water: 72 $ref: '#/components/examples/User' 73 '400': 74 $ref: '#/components/responses/BadRequest' 75 options: 76 description: Used by CORS preflight 77 tags: 78 - users 79 responses: 80 '200': 81 description: CORS prefilght requests should return 200 as status code 82 content: 83 application/json: {} 84 '/user/apikey_create': 85 get: 86 description: Generates and returns a new API key for current user 87 tags: 88 - users 89 summary: Returns a new API key 90 operationId: usersApiKeyCreate 91 security: 92 - basicAuth: [] 93 - apiKeyAuth: [] 94 responses: 95 '200': 96 description: OK 97 content: 98 application/json: 99 schema: 100 $ref: '#/components/schemas/apiKeys' 101 example: 'NewApiKey4711' 102 '400': 103 $ref: '#/components/responses/BadRequest' 104 '401': 105 $ref: '#/components/responses/Unauthorized' 106 '/user/{api_key}': 107 delete: 108 description: Deletes given API key and returns remaining API keys of the user 109 tags: 110 - users 111 summary: Deletes API key 112 operationId: usersApiKeyDelete 113 security: 114 - basicAuth: [] 115 - apiKeyAuth: [] 116 parameters: 117 - name: api_key 118 in: path 119 description: API key 120 required: true 121 schema: 122 $ref: '#/components/schemas/apiKey' 123 example: 'DelApiKey4711' 124 responses: 125 '200': 126 description: OK 127 content: 128 application/json: 129 schema: 130 $ref: '#/components/schemas/apiKeys' 131 example: 'ApiKey4711' 132 '400': 133 $ref: '#/components/responses/BadRequest' 134 '401': 135 $ref: '#/components/responses/Unauthorized' 136 '/user/activate/{activation_code}': 137 get: 138 description: Activates a user account 139 tags: 140 - users 141 summary: Activates a user account 142 operationId: usersActivate 143 parameters: 144 - name: activation_code 145 in: path 146 description: Activation code 147 required: true 148 schema: 149 $ref: '#/components/schemas/activationCode' 150 example: 'dac9630aec642a428cd73f4be0a03569' 151 responses: 152 '302': 153 description: OK or not OK 154 headers: 155 Location: 156 schema: 157 type: string 158 description: URL to the website, showing the result of the activation 25 159 /waters: 26 160 get: … … 32 166 parameters: 33 167 - name: name 34 in: header168 in: query 35 169 schema: 36 170 $ref: '#/components/schemas/item_name' 171 example: 'Missi' 37 172 - name: manager 38 in: header173 in: query 39 174 schema: 40 175 $ref: '#/components/schemas/username' 176 example: 'jane' 41 177 - $ref: '#/components/parameters/orderBy' 42 178 - $ref: '#/components/parameters/offset' … … 57 193 - waters 58 194 summary: Add a new water 195 operationId: watersCreate 59 196 security: 60 197 - basicAuth: [] 61 198 - apiKeyAuth: [] 62 199 requestBody: 63 description: item id of water is going to be ignored64 200 content: 65 201 application/json: … … 124 260 title: Username 125 261 type: string 262 apiKey: 263 title: API Key 264 type: string 265 apiKeys: 266 title: Array of API keys 267 type: array 268 items: 269 $ref: '#/components/schemas/apiKey' 270 activationCode: 271 title: Activation code for a User 272 type: string 126 273 item_id: 127 274 title: Item ID … … 131 278 title: Item Name 132 279 type: string 133 osm _type:280 osmType: 134 281 maxLength: 1 135 282 minLength: 1 136 283 type: string 284 User: 285 title: User 286 type: object 287 properties: 288 username: 289 $ref: '#/components/schemas/username' 290 email: 291 type: string 292 firstName: 293 type: string 294 lastName: 295 type: string 296 activated: 297 type: boolean 298 apiKeys: 299 $ref: '#/components/schemas/apiKeys' 300 UserCreation: 301 title: User 302 type: object 303 properties: 304 username: 305 $ref: '#/components/schemas/username' 306 email: 307 type: string 308 firstName: 309 type: string 310 lastName: 311 type: string 312 password: 313 type: string 314 required: 315 - username 316 - email 317 - firstName 318 - lastName 319 - password 137 320 Water: 138 321 title: Water 139 322 type: object 140 323 properties: 141 water _id:324 waterId: 142 325 $ref: '#/components/schemas/item_id' 143 326 name: … … 145 328 manager: 146 329 $ref: '#/components/schemas/username' 147 osm _id:330 osmId: 148 331 $ref: '#/components/schemas/item_id' 149 osm _type:150 $ref: '#/components/schemas/osm _type'332 osmType: 333 $ref: '#/components/schemas/osmType' 151 334 osm_class: 152 $ref: '#/components/schemas/osm _type'335 $ref: '#/components/schemas/osmType' 153 336 required: 154 - water _id337 - waterId 155 338 - name 156 339 WaterCreation: … … 160 343 name: 161 344 $ref: '#/components/schemas/item_name' 162 osm _id:345 osmId: 163 346 $ref: '#/components/schemas/item_id' 164 osm _type:165 $ref: '#/components/schemas/osm _type'347 osmType: 348 $ref: '#/components/schemas/osmType' 166 349 required: 167 350 - name … … 202 385 type: string 203 386 default: name 387 example: 'name' 204 388 order: 205 389 name: order … … 208 392 schema: 209 393 $ref: '#/components/schemas/order' 394 example: '' 210 395 offset: 211 396 name: offset … … 231 416 example: 10 232 417 examples: 418 User: 419 value: 420 username: jane 421 email: jane@example.org 422 firstName: Jane 423 lastName: Doe 424 activated: true 425 apiKeys: 426 - ApiKey4701 427 UserCreation: 428 value: 429 username: richard 430 email: richard@examle.org 431 firstName: Richard 432 lastName: Roe 433 password: sdfl.1238_ASDkeil? 233 434 Water: 234 435 value: 235 water _id: 1436 waterId: 1 236 437 name: Mississippi 237 osm _id: 1756854238 osm _type: R438 osmId: 1756854 439 osmType: R 239 440 link: 'http://gnuboat.engsas.com/mapservice/v1/waters/1' 240 441 summary: A water example object … … 242 443 value: 243 444 name: Mississippi 244 osm _id: 1756854245 osm _type: R445 osmId: 1756854 446 osmType: R 246 447 summary: A water example object for creation of a water 247 448 waters: 248 449 value: 249 - water _id: 1450 - waterId: 1 250 451 name: Mississippi 251 osm _id: 1756854252 osm _type: R452 osmId: 1756854 453 osmType: R 253 454 link: 'http://gnuboat.engsas.com/mapservice/v1/waters/1' 254 - water _id: 2455 - waterId: 2 255 456 name: Bodensee 256 457 link: 'http://gnuboat.engsas.com/mapservice/v1/waters/2' … … 293 494 A water is a river (like Mississippi, lake (Lake Ontario), or a sea (North 294 495 Sea) 496 - name: users 497 description: >- 498 All actions used to manage users and api keys
Note:
See TracChangeset
for help on using the changeset viewer.
