Skip to content

Commit 01e243c

Browse files
committed
updates workslpaces
1 parent 5b76ac4 commit 01e243c

File tree

3 files changed

+226
-2
lines changed

3 files changed

+226
-2
lines changed

api/specs/web-server/_common.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ def as_query(model_class: type[BaseModel]) -> type[BaseModel]:
9191

9292

9393
class EnvelopeE(BaseModel, Generic[ErrorT]):
94+
"""Complementary to models_library.generics.Envelope just for the generators"""
95+
9496
error: ErrorT | None = None
9597
data: Any | None = None
9698

api/specs/web-server/_workspaces.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,17 @@
99
from enum import Enum
1010
from typing import Annotated
1111

12-
from _common import as_query
12+
from _common import EnvelopeE, as_query
1313
from fastapi import APIRouter, Depends, status
1414
from models_library.api_schemas_webserver.workspaces import (
1515
WorkspaceCreateBodyParams,
1616
WorkspaceGet,
1717
WorkspaceReplaceBodyParams,
1818
)
1919
from models_library.generics import Envelope
20+
from models_library.rest_error import ErrorGet
2021
from simcore_service_webserver._meta import API_VTAG
22+
from simcore_service_webserver.folders._exceptions_handlers import _TO_HTTP_ERROR_MAP
2123
from simcore_service_webserver.workspaces._groups_api import WorkspaceGroupGet
2224
from simcore_service_webserver.workspaces._models import (
2325
WorkspacesGroupsBodyParams,
@@ -31,6 +33,10 @@
3133
tags=[
3234
"workspaces",
3335
],
36+
responses={
37+
i.status_code: {"model": EnvelopeE[ErrorGet]}
38+
for i in _TO_HTTP_ERROR_MAP.values()
39+
},
3440
)
3541

3642

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

Lines changed: 217 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4540,7 +4540,7 @@ paths:
45404540
'403':
45414541
description: ProjectInvalidRightsError
45424542
'404':
4543-
description: ProjectNotFoundError, UserDefaultWalletNotFoundError
4543+
description: UserDefaultWalletNotFoundError, ProjectNotFoundError
45444544
'409':
45454545
description: ProjectTooManyProjectOpenedError
45464546
'422':
@@ -5965,6 +5965,30 @@ paths:
59655965
application/json:
59665966
schema:
59675967
$ref: '#/components/schemas/Envelope_WorkspaceGet_'
5968+
'404':
5969+
content:
5970+
application/json:
5971+
schema:
5972+
$ref: '#/components/schemas/EnvelopeE_ErrorGet_'
5973+
description: Not Found
5974+
'403':
5975+
content:
5976+
application/json:
5977+
schema:
5978+
$ref: '#/components/schemas/EnvelopeE_ErrorGet_'
5979+
description: Forbidden
5980+
'409':
5981+
content:
5982+
application/json:
5983+
schema:
5984+
$ref: '#/components/schemas/EnvelopeE_ErrorGet_'
5985+
description: Conflict
5986+
'503':
5987+
content:
5988+
application/json:
5989+
schema:
5990+
$ref: '#/components/schemas/EnvelopeE_ErrorGet_'
5991+
description: Service Unavailable
59685992
get:
59695993
tags:
59705994
- workspaces
@@ -6011,6 +6035,30 @@ paths:
60116035
application/json:
60126036
schema:
60136037
$ref: '#/components/schemas/Envelope_list_WorkspaceGet__'
6038+
'404':
6039+
content:
6040+
application/json:
6041+
schema:
6042+
$ref: '#/components/schemas/EnvelopeE_ErrorGet_'
6043+
description: Not Found
6044+
'403':
6045+
content:
6046+
application/json:
6047+
schema:
6048+
$ref: '#/components/schemas/EnvelopeE_ErrorGet_'
6049+
description: Forbidden
6050+
'409':
6051+
content:
6052+
application/json:
6053+
schema:
6054+
$ref: '#/components/schemas/EnvelopeE_ErrorGet_'
6055+
description: Conflict
6056+
'503':
6057+
content:
6058+
application/json:
6059+
schema:
6060+
$ref: '#/components/schemas/EnvelopeE_ErrorGet_'
6061+
description: Service Unavailable
60146062
/v0/workspaces/{workspace_id}:
60156063
get:
60166064
tags:
@@ -6033,6 +6081,30 @@ paths:
60336081
application/json:
60346082
schema:
60356083
$ref: '#/components/schemas/Envelope_WorkspaceGet_'
6084+
'404':
6085+
content:
6086+
application/json:
6087+
schema:
6088+
$ref: '#/components/schemas/EnvelopeE_ErrorGet_'
6089+
description: Not Found
6090+
'403':
6091+
content:
6092+
application/json:
6093+
schema:
6094+
$ref: '#/components/schemas/EnvelopeE_ErrorGet_'
6095+
description: Forbidden
6096+
'409':
6097+
content:
6098+
application/json:
6099+
schema:
6100+
$ref: '#/components/schemas/EnvelopeE_ErrorGet_'
6101+
description: Conflict
6102+
'503':
6103+
content:
6104+
application/json:
6105+
schema:
6106+
$ref: '#/components/schemas/EnvelopeE_ErrorGet_'
6107+
description: Service Unavailable
60366108
put:
60376109
tags:
60386110
- workspaces
@@ -6060,6 +6132,30 @@ paths:
60606132
application/json:
60616133
schema:
60626134
$ref: '#/components/schemas/Envelope_WorkspaceGet_'
6135+
'404':
6136+
content:
6137+
application/json:
6138+
schema:
6139+
$ref: '#/components/schemas/EnvelopeE_ErrorGet_'
6140+
description: Not Found
6141+
'403':
6142+
content:
6143+
application/json:
6144+
schema:
6145+
$ref: '#/components/schemas/EnvelopeE_ErrorGet_'
6146+
description: Forbidden
6147+
'409':
6148+
content:
6149+
application/json:
6150+
schema:
6151+
$ref: '#/components/schemas/EnvelopeE_ErrorGet_'
6152+
description: Conflict
6153+
'503':
6154+
content:
6155+
application/json:
6156+
schema:
6157+
$ref: '#/components/schemas/EnvelopeE_ErrorGet_'
6158+
description: Service Unavailable
60636159
delete:
60646160
tags:
60656161
- workspaces
@@ -6077,6 +6173,30 @@ paths:
60776173
responses:
60786174
'204':
60796175
description: Successful Response
6176+
'404':
6177+
content:
6178+
application/json:
6179+
schema:
6180+
$ref: '#/components/schemas/EnvelopeE_ErrorGet_'
6181+
description: Not Found
6182+
'403':
6183+
content:
6184+
application/json:
6185+
schema:
6186+
$ref: '#/components/schemas/EnvelopeE_ErrorGet_'
6187+
description: Forbidden
6188+
'409':
6189+
content:
6190+
application/json:
6191+
schema:
6192+
$ref: '#/components/schemas/EnvelopeE_ErrorGet_'
6193+
description: Conflict
6194+
'503':
6195+
content:
6196+
application/json:
6197+
schema:
6198+
$ref: '#/components/schemas/EnvelopeE_ErrorGet_'
6199+
description: Service Unavailable
60806200
/v0/workspaces/{workspace_id}/groups/{group_id}:
60816201
post:
60826202
tags:
@@ -6114,6 +6234,30 @@ paths:
61146234
application/json:
61156235
schema:
61166236
$ref: '#/components/schemas/Envelope_WorkspaceGroupGet_'
6237+
'404':
6238+
content:
6239+
application/json:
6240+
schema:
6241+
$ref: '#/components/schemas/EnvelopeE_ErrorGet_'
6242+
description: Not Found
6243+
'403':
6244+
content:
6245+
application/json:
6246+
schema:
6247+
$ref: '#/components/schemas/EnvelopeE_ErrorGet_'
6248+
description: Forbidden
6249+
'409':
6250+
content:
6251+
application/json:
6252+
schema:
6253+
$ref: '#/components/schemas/EnvelopeE_ErrorGet_'
6254+
description: Conflict
6255+
'503':
6256+
content:
6257+
application/json:
6258+
schema:
6259+
$ref: '#/components/schemas/EnvelopeE_ErrorGet_'
6260+
description: Service Unavailable
61176261
put:
61186262
tags:
61196263
- workspaces
@@ -6150,6 +6294,30 @@ paths:
61506294
application/json:
61516295
schema:
61526296
$ref: '#/components/schemas/Envelope_WorkspaceGroupGet_'
6297+
'404':
6298+
content:
6299+
application/json:
6300+
schema:
6301+
$ref: '#/components/schemas/EnvelopeE_ErrorGet_'
6302+
description: Not Found
6303+
'403':
6304+
content:
6305+
application/json:
6306+
schema:
6307+
$ref: '#/components/schemas/EnvelopeE_ErrorGet_'
6308+
description: Forbidden
6309+
'409':
6310+
content:
6311+
application/json:
6312+
schema:
6313+
$ref: '#/components/schemas/EnvelopeE_ErrorGet_'
6314+
description: Conflict
6315+
'503':
6316+
content:
6317+
application/json:
6318+
schema:
6319+
$ref: '#/components/schemas/EnvelopeE_ErrorGet_'
6320+
description: Service Unavailable
61536321
delete:
61546322
tags:
61556323
- workspaces
@@ -6176,6 +6344,30 @@ paths:
61766344
responses:
61776345
'204':
61786346
description: Successful Response
6347+
'404':
6348+
content:
6349+
application/json:
6350+
schema:
6351+
$ref: '#/components/schemas/EnvelopeE_ErrorGet_'
6352+
description: Not Found
6353+
'403':
6354+
content:
6355+
application/json:
6356+
schema:
6357+
$ref: '#/components/schemas/EnvelopeE_ErrorGet_'
6358+
description: Forbidden
6359+
'409':
6360+
content:
6361+
application/json:
6362+
schema:
6363+
$ref: '#/components/schemas/EnvelopeE_ErrorGet_'
6364+
description: Conflict
6365+
'503':
6366+
content:
6367+
application/json:
6368+
schema:
6369+
$ref: '#/components/schemas/EnvelopeE_ErrorGet_'
6370+
description: Service Unavailable
61796371
/v0/workspaces/{workspace_id}/groups:
61806372
get:
61816373
tags:
@@ -6199,6 +6391,30 @@ paths:
61996391
application/json:
62006392
schema:
62016393
$ref: '#/components/schemas/Envelope_list_WorkspaceGroupGet__'
6394+
'404':
6395+
content:
6396+
application/json:
6397+
schema:
6398+
$ref: '#/components/schemas/EnvelopeE_ErrorGet_'
6399+
description: Not Found
6400+
'403':
6401+
content:
6402+
application/json:
6403+
schema:
6404+
$ref: '#/components/schemas/EnvelopeE_ErrorGet_'
6405+
description: Forbidden
6406+
'409':
6407+
content:
6408+
application/json:
6409+
schema:
6410+
$ref: '#/components/schemas/EnvelopeE_ErrorGet_'
6411+
description: Conflict
6412+
'503':
6413+
content:
6414+
application/json:
6415+
schema:
6416+
$ref: '#/components/schemas/EnvelopeE_ErrorGet_'
6417+
description: Service Unavailable
62026418
/v0/email:test:
62036419
post:
62046420
tags:

0 commit comments

Comments
 (0)