Skip to content

Commit fb2a8d1

Browse files
update open api specs
1 parent 243c5dc commit fb2a8d1

File tree

2 files changed

+106
-14
lines changed

2 files changed

+106
-14
lines changed

api/specs/web-server/_computations.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@
55
from models_library.api_schemas_webserver.computations import (
66
ComputationGet,
77
ComputationPathParams,
8+
ComputationRunRestGet,
89
ComputationStart,
910
ComputationStarted,
11+
ComputationTaskRestGet,
1012
)
1113
from models_library.generics import Envelope
1214
from simcore_service_webserver._meta import API_VTAG
13-
from simcore_service_webserver.director_v2._computations_rest_schema import (
15+
from simcore_service_webserver.director_v2._controller._computations_rest_schema import (
1416
ComputationRunListQueryParams,
1517
ComputationTaskListQueryParams,
1618
ComputationTaskPathParams,
@@ -63,9 +65,7 @@ async def stop_computation(_path: Annotated[ComputationPathParams, Depends()]):
6365

6466
@router.get(
6567
"/computations/-/iterations/latest",
66-
response_model=Envelope[list[ComputationGet]],
67-
name="list_computations_latest_iteration",
68-
description="Lists the latest iteration of computations",
68+
response_model=Envelope[list[ComputationRunRestGet]],
6969
)
7070
async def list_computations_latest_iteration(
7171
_query: Annotated[as_query(ComputationRunListQueryParams), Depends()],
@@ -74,9 +74,7 @@ async def list_computations_latest_iteration(
7474

7575
@router.get(
7676
"/computations/{project_id}/iterations/latest/tasks",
77-
response_model=Envelope[list[ComputationGet]],
78-
name="list_computations_latest_iteration_tasks",
79-
description="Lists the latest iteration tasks for a computation",
77+
response_model=Envelope[list[ComputationTaskRestGet]],
8078
)
8179
async def list_computations_latest_iteration_tasks(
8280
_query: Annotated[as_query(ComputationTaskListQueryParams), Depends()],

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

Lines changed: 101 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2542,7 +2542,6 @@ paths:
25422542
- computations
25432543
- projects
25442544
summary: List Computations Latest Iteration
2545-
description: Lists the latest iteration of computations
25462545
operationId: list_computations_latest_iteration
25472546
parameters:
25482547
- name: order_by
@@ -2574,14 +2573,13 @@ paths:
25742573
content:
25752574
application/json:
25762575
schema:
2577-
$ref: '#/components/schemas/Envelope_list_ComputationGet__'
2576+
$ref: '#/components/schemas/Envelope_list_ComputationRunRestGet__'
25782577
/v0/computations/{project_id}/iterations/latest/tasks:
25792578
get:
25802579
tags:
25812580
- computations
25822581
- projects
25832582
summary: List Computations Latest Iteration Tasks
2584-
description: Lists the latest iteration tasks for a computation
25852583
operationId: list_computations_latest_iteration_tasks
25862584
parameters:
25872585
- name: project_id
@@ -2620,7 +2618,7 @@ paths:
26202618
content:
26212619
application/json:
26222620
schema:
2623-
$ref: '#/components/schemas/Envelope_list_ComputationGet__'
2621+
$ref: '#/components/schemas/Envelope_list_ComputationTaskRestGet__'
26242622
/v0/projects/{project_id}:xport:
26252623
post:
26262624
tags:
@@ -8726,6 +8724,46 @@ components:
87268724
- submitted
87278725
- url
87288726
title: ComputationGet
8727+
ComputationRunRestGet:
8728+
properties:
8729+
project_uuid:
8730+
type: string
8731+
format: uuid
8732+
title: Project Uuid
8733+
iteration:
8734+
type: integer
8735+
title: Iteration
8736+
state:
8737+
$ref: '#/components/schemas/RunningState'
8738+
info:
8739+
type: object
8740+
title: Info
8741+
submitted_at:
8742+
type: string
8743+
format: date-time
8744+
title: Submitted At
8745+
started_at:
8746+
anyOf:
8747+
- type: string
8748+
format: date-time
8749+
- type: 'null'
8750+
title: Started At
8751+
ended_at:
8752+
anyOf:
8753+
- type: string
8754+
format: date-time
8755+
- type: 'null'
8756+
title: Ended At
8757+
type: object
8758+
required:
8759+
- project_uuid
8760+
- iteration
8761+
- state
8762+
- info
8763+
- submitted_at
8764+
- started_at
8765+
- ended_at
8766+
title: ComputationRunRestGet
87298767
ComputationStart:
87308768
properties:
87318769
force_restart:
@@ -8759,6 +8797,46 @@ components:
87598797
required:
87608798
- pipeline_id
87618799
title: ComputationStarted
8800+
ComputationTaskRestGet:
8801+
properties:
8802+
project_uuid:
8803+
type: string
8804+
format: uuid
8805+
title: Project Uuid
8806+
node_id:
8807+
type: string
8808+
format: uuid
8809+
title: Node Id
8810+
state:
8811+
$ref: '#/components/schemas/RunningState'
8812+
progress:
8813+
type: number
8814+
title: Progress
8815+
image:
8816+
type: object
8817+
title: Image
8818+
started_at:
8819+
anyOf:
8820+
- type: string
8821+
format: date-time
8822+
- type: 'null'
8823+
title: Started At
8824+
ended_at:
8825+
anyOf:
8826+
- type: string
8827+
format: date-time
8828+
- type: 'null'
8829+
title: Ended At
8830+
type: object
8831+
required:
8832+
- project_uuid
8833+
- node_id
8834+
- state
8835+
- progress
8836+
- image
8837+
- started_at
8838+
- ended_at
8839+
title: ComputationTaskRestGet
87628840
ConnectServiceToPricingPlanBodyParams:
87638841
properties:
87648842
serviceKey:
@@ -10111,12 +10189,28 @@ components:
1011110189
title: Error
1011210190
type: object
1011310191
title: Envelope[list[ApiKeyGet]]
10114-
Envelope_list_ComputationGet__:
10192+
Envelope_list_ComputationRunRestGet__:
10193+
properties:
10194+
data:
10195+
anyOf:
10196+
- items:
10197+
$ref: '#/components/schemas/ComputationRunRestGet'
10198+
type: array
10199+
- type: 'null'
10200+
title: Data
10201+
error:
10202+
anyOf:
10203+
- {}
10204+
- type: 'null'
10205+
title: Error
10206+
type: object
10207+
title: Envelope[list[ComputationRunRestGet]]
10208+
Envelope_list_ComputationTaskRestGet__:
1011510209
properties:
1011610210
data:
1011710211
anyOf:
1011810212
- items:
10119-
$ref: '#/components/schemas/ComputationGet'
10213+
$ref: '#/components/schemas/ComputationTaskRestGet'
1012010214
type: array
1012110215
- type: 'null'
1012210216
title: Data
@@ -10126,7 +10220,7 @@ components:
1012610220
- type: 'null'
1012710221
title: Error
1012810222
type: object
10129-
title: Envelope[list[ComputationGet]]
10223+
title: Envelope[list[ComputationTaskRestGet]]
1013010224
Envelope_list_DatasetMetaData__:
1013110225
properties:
1013210226
data:

0 commit comments

Comments
 (0)