Skip to content

Commit 56caa82

Browse files
update openapi spec
1 parent 0fd1e5d commit 56caa82

File tree

2 files changed

+98
-70
lines changed

2 files changed

+98
-70
lines changed

api/specs/web-server/_auth_api_keys.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ async def create_api_key(_body: ApiKeyCreate):
3434
status_code=status.HTTP_200_OK,
3535
)
3636
async def list_api_keys():
37-
"""lists display names of API keys by this user"""
37+
"""lists API keys by this user"""
3838

3939

4040
@router.get(
@@ -44,13 +44,13 @@ async def list_api_keys():
4444
status_code=status.HTTP_200_OK,
4545
)
4646
async def get_api_key(_path: Annotated[ApiKeysPathParams, Depends()]):
47-
"""returns the key or None"""
47+
"""returns the API Key with the given ID"""
4848

4949

5050
@router.delete(
51-
"/auth/api-keys",
51+
"/auth/api-keys/{api_key_id}",
5252
operation_id="delete_api_key",
5353
status_code=status.HTTP_204_NO_CONTENT,
5454
)
5555
async def delete_api_key(_path: Annotated[ApiKeysPathParams, Depends()]):
56-
"""deletes API key by ID"""
56+
"""deletes the API key with the given ID"""

services/web/server/src/simcore_service_webserver/api/v0/openapi.yaml

Lines changed: 94 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -369,29 +369,39 @@ paths:
369369
$ref: '#/components/schemas/Envelope_Log_'
370370
3XX:
371371
description: redirection to specific ui application page
372+
/v0/auth/captcha:
373+
get:
374+
tags:
375+
- auth
376+
summary: Request Captcha
377+
operationId: request_captcha
378+
responses:
379+
'200':
380+
description: Successful Response
381+
content:
382+
application/json:
383+
schema: {}
384+
image/png: {}
372385
/v0/auth/api-keys:
373386
get:
374387
tags:
375388
- auth
376389
summary: List Api Keys
377-
description: lists display names of API keys by this user
390+
description: lists API keys by this user
378391
operationId: list_api_keys
379392
responses:
380393
'200':
381-
description: returns the display names of API keys
394+
description: Successful Response
382395
content:
383396
application/json:
384397
schema:
385-
items:
386-
type: string
387-
type: array
388-
title: Response 200 List Api Keys
389-
'400':
390-
description: key name requested is invalid
391-
'401':
392-
description: requires login to list keys
393-
'403':
394-
description: not enough permissions to list keys
398+
$ref: '#/components/schemas/Envelope_list_ApiKeyGet__'
399+
'404':
400+
description: Not Found
401+
content:
402+
application/json:
403+
schema:
404+
$ref: '#/components/schemas/EnvelopedError'
395405
post:
396406
tags:
397407
- auth
@@ -405,43 +415,24 @@ paths:
405415
$ref: '#/components/schemas/ApiKeyCreate'
406416
required: true
407417
responses:
408-
'200':
409-
description: Authorization granted returning API key
418+
'201':
419+
description: Successful Response
410420
content:
411421
application/json:
412422
schema:
413-
$ref: '#/components/schemas/ApiKeyGet'
414-
'400':
415-
description: key name requested is invalid
416-
'401':
417-
description: requires login to list keys
418-
'403':
419-
description: not enough permissions to list keys
420-
delete:
421-
tags:
422-
- auth
423-
summary: Delete Api Key
424-
description: deletes API key by name
425-
operationId: delete_api_key
426-
requestBody:
427-
content:
428-
application/json:
429-
schema:
430-
$ref: '#/components/schemas/ApiKeyCreate'
431-
required: true
432-
responses:
433-
'204':
434-
description: api key successfully deleted
435-
'401':
436-
description: requires login to delete a key
437-
'403':
438-
description: not enough permissions to delete a key
423+
$ref: '#/components/schemas/Envelope_ApiKeyGet_'
424+
'404':
425+
description: Not Found
426+
content:
427+
application/json:
428+
schema:
429+
$ref: '#/components/schemas/EnvelopedError'
439430
/v0/auth/api-keys/{api_key_id}:
440431
get:
441432
tags:
442433
- auth
443434
summary: Get Api Key
444-
description: returns the key or None
435+
description: returns the API Key with the given ID
445436
operationId: get_api_key
446437
parameters:
447438
- name: api_key_id
@@ -452,33 +443,39 @@ paths:
452443
title: Api Key Id
453444
responses:
454445
'200':
455-
description: returns the api key or None
446+
description: Successful Response
456447
content:
457448
application/json:
458449
schema:
459-
anyOf:
460-
- $ref: '#/components/schemas/ApiKeyGet'
461-
- type: 'null'
462-
title: Response 200 Get Api Key
463-
'400':
464-
description: key name requested is invalid
465-
'401':
466-
description: requires login to get the keu
467-
'403':
468-
description: not enough permissions to get the keu
469-
/v0/auth/captcha:
470-
get:
450+
$ref: '#/components/schemas/Envelope_ApiKeyGet_'
451+
'404':
452+
content:
453+
application/json:
454+
schema:
455+
$ref: '#/components/schemas/EnvelopedError'
456+
description: Not Found
457+
delete:
471458
tags:
472459
- auth
473-
summary: Request Captcha
474-
operationId: request_captcha
460+
summary: Delete Api Key
461+
description: deletes the API key with the given ID
462+
operationId: delete_api_key
463+
parameters:
464+
- name: api_key_id
465+
in: path
466+
required: true
467+
schema:
468+
type: integer
469+
title: Api Key Id
475470
responses:
476-
'200':
471+
'204':
477472
description: Successful Response
473+
'404':
478474
content:
479475
application/json:
480-
schema: {}
481-
image/png: {}
476+
schema:
477+
$ref: '#/components/schemas/EnvelopedError'
478+
description: Not Found
482479
/v0/groups:
483480
get:
484481
tags:
@@ -4474,7 +4471,7 @@ paths:
44744471
'403':
44754472
description: ProjectInvalidRightsError
44764473
'404':
4477-
description: UserDefaultWalletNotFoundError, ProjectNotFoundError
4474+
description: ProjectNotFoundError, UserDefaultWalletNotFoundError
44784475
'409':
44794476
description: ProjectTooManyProjectOpenedError
44804477
'422':
@@ -6659,26 +6656,28 @@ components:
66596656
type: string
66606657
minLength: 3
66616658
title: Display Name
6662-
base_url:
6659+
api_base_url:
66636660
anyOf:
66646661
- type: string
66656662
maxLength: 2083
66666663
minLength: 1
66676664
format: uri
66686665
- type: 'null'
6669-
title: Base Url
6666+
title: Api Base Url
66706667
api_key:
6671-
type: string
6668+
anyOf:
6669+
- type: string
6670+
- type: 'null'
66726671
title: Api Key
66736672
api_secret:
6674-
type: string
6673+
anyOf:
6674+
- type: string
6675+
- type: 'null'
66756676
title: Api Secret
66766677
type: object
66776678
required:
66786679
- id
66796680
- display_name
6680-
- api_key
6681-
- api_secret
66826681
title: ApiKeyGet
66836682
AppStatusCheck:
66846683
properties:
@@ -7505,6 +7504,19 @@ components:
75057504
additionalProperties: false
75067505
type: object
75077506
title: EmptyModel
7507+
Envelope_ApiKeyGet_:
7508+
properties:
7509+
data:
7510+
anyOf:
7511+
- $ref: '#/components/schemas/ApiKeyGet'
7512+
- type: 'null'
7513+
error:
7514+
anyOf:
7515+
- {}
7516+
- type: 'null'
7517+
title: Error
7518+
type: object
7519+
title: Envelope[ApiKeyGet]
75087520
Envelope_AppStatusCheck_:
75097521
properties:
75107522
data:
@@ -8461,6 +8473,22 @@ components:
84618473
title: Error
84628474
type: object
84638475
title: Envelope[list[Announcement]]
8476+
Envelope_list_ApiKeyGet__:
8477+
properties:
8478+
data:
8479+
anyOf:
8480+
- items:
8481+
$ref: '#/components/schemas/ApiKeyGet'
8482+
type: array
8483+
- type: 'null'
8484+
title: Data
8485+
error:
8486+
anyOf:
8487+
- {}
8488+
- type: 'null'
8489+
title: Error
8490+
type: object
8491+
title: Envelope[list[ApiKeyGet]]
84648492
Envelope_list_DatasetMetaData__:
84658493
properties:
84668494
data:

0 commit comments

Comments
 (0)