Skip to content

Commit 7eaf541

Browse files
committed
updates OAS
1 parent 3d1d8a9 commit 7eaf541

File tree

2 files changed

+88
-9
lines changed

2 files changed

+88
-9
lines changed

api/specs/web-server/_users.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@
1515
MyTokenCreate,
1616
MyTokenGet,
1717
UserForAdminGet,
18+
UserGet,
1819
UsersForAdminSearchQueryParams,
1920
UsersGetParams,
21+
UsersSearch,
2022
)
2123
from models_library.api_schemas_webserver.users_preferences import PatchRequestBody
2224
from models_library.generics import Envelope
@@ -150,18 +152,18 @@ async def list_user_permissions():
150152

151153
@router.get(
152154
"/users/{user_id}",
153-
response_model=Envelope[UserForAdminGet],
155+
response_model=Envelope[UserGet],
154156
)
155157
async def get_user(_path: Annotated[UsersGetParams, Depends()]):
156158
...
157159

158160

159161
@router.post(
160162
"/users:search",
161-
response_model=Envelope[list[UserForAdminGet]],
163+
response_model=Envelope[list[UserGet]],
162164
description="Search among users who are publicly visible to the caller (i.e., me) based on their privacy settings.",
163165
)
164-
async def search_users(_body: Annotated[UsersForAdminSearchQueryParams, Depends()]):
166+
async def search_users(_body: Annotated[UsersSearch, Depends()]):
165167
...
166168

167169

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

Lines changed: 83 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1344,7 +1344,7 @@ paths:
13441344
content:
13451345
application/json:
13461346
schema:
1347-
$ref: '#/components/schemas/Envelope_UserForAdminGet_'
1347+
$ref: '#/components/schemas/Envelope_UserGet_'
13481348
/v0/users:search:
13491349
post:
13501350
tags:
@@ -1354,21 +1354,30 @@ paths:
13541354
me) based on their privacy settings.
13551355
operationId: search_users
13561356
parameters:
1357-
- name: email
1357+
- name: match
13581358
in: query
13591359
required: true
13601360
schema:
13611361
type: string
1362-
minLength: 3
1363-
maxLength: 200
1364-
title: Email
1362+
minLength: 1
1363+
maxLength: 80
1364+
title: Match
1365+
- name: limit
1366+
in: query
1367+
required: false
1368+
schema:
1369+
type: integer
1370+
maximum: 50
1371+
minimum: 1
1372+
default: 10
1373+
title: Limit
13651374
responses:
13661375
'200':
13671376
description: Successful Response
13681377
content:
13691378
application/json:
13701379
schema:
1371-
$ref: '#/components/schemas/Envelope_list_UserForAdminGet__'
1380+
$ref: '#/components/schemas/Envelope_list_UserGet__'
13721381
/v0/admin/users:search:
13731382
get:
13741383
tags:
@@ -8615,6 +8624,19 @@ components:
86158624
title: Error
86168625
type: object
86178626
title: Envelope[UserForAdminGet]
8627+
Envelope_UserGet_:
8628+
properties:
8629+
data:
8630+
anyOf:
8631+
- $ref: '#/components/schemas/UserGet'
8632+
- type: 'null'
8633+
error:
8634+
anyOf:
8635+
- {}
8636+
- type: 'null'
8637+
title: Error
8638+
type: object
8639+
title: Envelope[UserGet]
86188640
Envelope_WalletGetWithAvailableCredits_:
86198641
properties:
86208642
data:
@@ -9264,6 +9286,22 @@ components:
92649286
title: Error
92659287
type: object
92669288
title: Envelope[list[UserForAdminGet]]
9289+
Envelope_list_UserGet__:
9290+
properties:
9291+
data:
9292+
anyOf:
9293+
- items:
9294+
$ref: '#/components/schemas/UserGet'
9295+
type: array
9296+
- type: 'null'
9297+
title: Data
9298+
error:
9299+
anyOf:
9300+
- {}
9301+
- type: 'null'
9302+
title: Error
9303+
type: object
9304+
title: Envelope[list[UserGet]]
92679305
Envelope_list_UserNotification__:
92689306
properties:
92699307
data:
@@ -14478,6 +14516,45 @@ components:
1447814516
- registered
1447914517
- status
1448014518
title: UserForAdminGet
14519+
UserGet:
14520+
properties:
14521+
userId:
14522+
type: integer
14523+
exclusiveMinimum: true
14524+
title: Userid
14525+
minimum: 0
14526+
groupId:
14527+
type: integer
14528+
exclusiveMinimum: true
14529+
title: Groupid
14530+
minimum: 0
14531+
userName:
14532+
type: string
14533+
maxLength: 100
14534+
minLength: 1
14535+
title: Username
14536+
firstName:
14537+
anyOf:
14538+
- type: string
14539+
- type: 'null'
14540+
title: Firstname
14541+
lastName:
14542+
anyOf:
14543+
- type: string
14544+
- type: 'null'
14545+
title: Lastname
14546+
email:
14547+
anyOf:
14548+
- type: string
14549+
format: email
14550+
- type: 'null'
14551+
title: Email
14552+
type: object
14553+
required:
14554+
- userId
14555+
- groupId
14556+
- userName
14557+
title: UserGet
1448114558
UserNotification:
1448214559
properties:
1448314560
user_id:

0 commit comments

Comments
 (0)