Skip to content

Commit 18f2e68

Browse files
fix: endpoint summary
1 parent 0d32830 commit 18f2e68

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

api/specs/web-server/_functions.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,16 +94,18 @@ async def get_function_groups(
9494

9595
@router.put(
9696
"/functions/{function_id}/groups/{group_id}",
97+
summary="Create or update a Function Group",
9798
response_model=Envelope[FunctionGroupAccessRightsGet],
9899
)
99-
async def update_function_group(
100+
async def create_or_update_function_group(
100101
_path: Annotated[FunctionGroupPathParams, Depends()],
101102
_body: FunctionGroupAccessRightsUpdate,
102103
): ...
103104

104105

105106
@router.delete(
106107
"/functions/{function_id}/groups/{group_id}",
108+
summary="Delete a Function Group",
107109
status_code=status.HTTP_204_NO_CONTENT,
108110
)
109111
async def delete_function_group(

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3786,8 +3786,8 @@ paths:
37863786
put:
37873787
tags:
37883788
- functions
3789-
summary: Create or Update Function Group
3790-
operationId: update_function_group
3789+
summary: Create or update a Function Group
3790+
operationId: create_or_update_function_group
37913791
parameters:
37923792
- name: function_id
37933793
in: path
@@ -3820,7 +3820,7 @@ paths:
38203820
delete:
38213821
tags:
38223822
- functions
3823-
summary: Delete Function Group
3823+
summary: Delete a Function Group
38243824
operationId: delete_function_group
38253825
parameters:
38263826
- name: function_id

services/web/server/src/simcore_service_webserver/functions/_controller/_functions_rest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,12 +409,12 @@ async def get_function_groups(request: web.Request) -> web.Response:
409409

410410
@routes.put(
411411
f"/{VTAG}/functions/{{function_id}}/groups/{{group_id}}",
412-
name="update_function_group",
412+
name="create_or_update_function_group",
413413
)
414414
@login_required
415415
@permission_required("function.update")
416416
@handle_rest_requests_exceptions
417-
async def update_function_group(request: web.Request) -> web.Response:
417+
async def create_or_update_function_group(request: web.Request) -> web.Response:
418418
path_params = parse_request_path_parameters_as(FunctionGroupPathParams, request)
419419
function_id = path_params.function_id
420420
group_id = path_params.group_id

services/web/server/tests/unit/with_dbs/04/functions/test_functions_controller_rest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ async def test_function_workflow(
123123
new_group_id = other_logged_user["primary_gid"]
124124
new_group_access_rights = {"read": True, "write": True, "execute": False}
125125

126-
url = client.app.router["update_function_group"].url_for(
126+
url = client.app.router["create_or_update_function_group"].url_for(
127127
function_id=f"{returned_function_uid}", group_id=f"{new_group_id}"
128128
)
129129

0 commit comments

Comments
 (0)