Skip to content

Commit 56f01ff

Browse files
committed
update openapi specs
1 parent 2ae921b commit 56f01ff

File tree

2 files changed

+361
-1
lines changed

2 files changed

+361
-1
lines changed

services/api-server/openapi.json

Lines changed: 360 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7829,10 +7829,249 @@
78297829
}
78307830
}
78317831
}
7832+
},
7833+
"/v0/tasks": {
7834+
"get": {
7835+
"tags": [
7836+
"tasks"
7837+
],
7838+
"summary": "Get Async Jobs",
7839+
"operationId": "get_async_jobs",
7840+
"responses": {
7841+
"200": {
7842+
"description": "Successful Response",
7843+
"content": {
7844+
"application/json": {
7845+
"schema": {
7846+
"$ref": "#/components/schemas/ApiServerEnvelope_list_TaskGet__"
7847+
}
7848+
}
7849+
}
7850+
},
7851+
"500": {
7852+
"description": "Internal server error",
7853+
"content": {
7854+
"application/json": {
7855+
"schema": {
7856+
"$ref": "#/components/schemas/ErrorGet"
7857+
}
7858+
}
7859+
}
7860+
}
7861+
},
7862+
"security": [
7863+
{
7864+
"HTTPBasic": []
7865+
}
7866+
]
7867+
}
7868+
},
7869+
"/v0/tasks/{task_id}": {
7870+
"get": {
7871+
"tags": [
7872+
"tasks"
7873+
],
7874+
"summary": "Get Async Job Status",
7875+
"operationId": "get_async_job_status",
7876+
"security": [
7877+
{
7878+
"HTTPBasic": []
7879+
}
7880+
],
7881+
"parameters": [
7882+
{
7883+
"name": "task_id",
7884+
"in": "path",
7885+
"required": true,
7886+
"schema": {
7887+
"type": "string",
7888+
"format": "uuid",
7889+
"title": "Task Id"
7890+
}
7891+
}
7892+
],
7893+
"responses": {
7894+
"200": {
7895+
"description": "Successful Response",
7896+
"content": {
7897+
"application/json": {
7898+
"schema": {
7899+
"$ref": "#/components/schemas/TaskStatus"
7900+
}
7901+
}
7902+
}
7903+
},
7904+
"500": {
7905+
"description": "Internal server error",
7906+
"content": {
7907+
"application/json": {
7908+
"schema": {
7909+
"$ref": "#/components/schemas/ErrorGet"
7910+
}
7911+
}
7912+
}
7913+
},
7914+
"422": {
7915+
"description": "Validation Error",
7916+
"content": {
7917+
"application/json": {
7918+
"schema": {
7919+
"$ref": "#/components/schemas/HTTPValidationError"
7920+
}
7921+
}
7922+
}
7923+
}
7924+
}
7925+
}
7926+
},
7927+
"/v0/tasks/{task_id}:cancel": {
7928+
"post": {
7929+
"tags": [
7930+
"tasks"
7931+
],
7932+
"summary": "Cancel Async Job",
7933+
"operationId": "cancel_async_job",
7934+
"security": [
7935+
{
7936+
"HTTPBasic": []
7937+
}
7938+
],
7939+
"parameters": [
7940+
{
7941+
"name": "task_id",
7942+
"in": "path",
7943+
"required": true,
7944+
"schema": {
7945+
"type": "string",
7946+
"format": "uuid",
7947+
"title": "Task Id"
7948+
}
7949+
}
7950+
],
7951+
"responses": {
7952+
"204": {
7953+
"description": "Successful Response"
7954+
},
7955+
"500": {
7956+
"description": "Internal server error",
7957+
"content": {
7958+
"application/json": {
7959+
"schema": {
7960+
"$ref": "#/components/schemas/ErrorGet"
7961+
}
7962+
}
7963+
}
7964+
},
7965+
"422": {
7966+
"description": "Validation Error",
7967+
"content": {
7968+
"application/json": {
7969+
"schema": {
7970+
"$ref": "#/components/schemas/HTTPValidationError"
7971+
}
7972+
}
7973+
}
7974+
}
7975+
}
7976+
}
7977+
},
7978+
"/v0/tasks/{task_id}/result": {
7979+
"get": {
7980+
"tags": [
7981+
"tasks"
7982+
],
7983+
"summary": "Get Async Job Result",
7984+
"operationId": "get_async_job_result",
7985+
"security": [
7986+
{
7987+
"HTTPBasic": []
7988+
}
7989+
],
7990+
"parameters": [
7991+
{
7992+
"name": "task_id",
7993+
"in": "path",
7994+
"required": true,
7995+
"schema": {
7996+
"type": "string",
7997+
"format": "uuid",
7998+
"title": "Task Id"
7999+
}
8000+
}
8001+
],
8002+
"responses": {
8003+
"200": {
8004+
"description": "Successful Response",
8005+
"content": {
8006+
"application/json": {
8007+
"schema": {
8008+
"$ref": "#/components/schemas/TaskResult"
8009+
}
8010+
}
8011+
}
8012+
},
8013+
"404": {
8014+
"description": "Task result not found",
8015+
"content": {
8016+
"application/json": {
8017+
"schema": {
8018+
"$ref": "#/components/schemas/ErrorGet"
8019+
}
8020+
}
8021+
}
8022+
},
8023+
"409": {
8024+
"description": "Task is cancelled",
8025+
"content": {
8026+
"application/json": {
8027+
"schema": {
8028+
"$ref": "#/components/schemas/ErrorGet"
8029+
}
8030+
}
8031+
}
8032+
},
8033+
"500": {
8034+
"description": "Internal server error",
8035+
"content": {
8036+
"application/json": {
8037+
"schema": {
8038+
"$ref": "#/components/schemas/ErrorGet"
8039+
}
8040+
}
8041+
}
8042+
},
8043+
"422": {
8044+
"description": "Validation Error",
8045+
"content": {
8046+
"application/json": {
8047+
"schema": {
8048+
"$ref": "#/components/schemas/HTTPValidationError"
8049+
}
8050+
}
8051+
}
8052+
}
8053+
}
8054+
}
78328055
}
78338056
},
78348057
"components": {
78358058
"schemas": {
8059+
"ApiServerEnvelope_list_TaskGet__": {
8060+
"properties": {
8061+
"data": {
8062+
"items": {
8063+
"$ref": "#/components/schemas/TaskGet"
8064+
},
8065+
"type": "array",
8066+
"title": "Data"
8067+
}
8068+
},
8069+
"type": "object",
8070+
"required": [
8071+
"data"
8072+
],
8073+
"title": "ApiServerEnvelope[list[TaskGet]]"
8074+
},
78368075
"Body_abort_multipart_upload_v0_files__file_id__abort_post": {
78378076
"properties": {
78388077
"client_file": {
@@ -11114,6 +11353,127 @@
1111411353
"kind": "input"
1111511354
}
1111611355
},
11356+
"TaskGet": {
11357+
"properties": {
11358+
"task_id": {
11359+
"type": "string",
11360+
"title": "Task Id"
11361+
},
11362+
"task_name": {
11363+
"type": "string",
11364+
"title": "Task Name"
11365+
},
11366+
"status_href": {
11367+
"type": "string",
11368+
"title": "Status Href"
11369+
},
11370+
"result_href": {
11371+
"type": "string",
11372+
"title": "Result Href"
11373+
},
11374+
"abort_href": {
11375+
"type": "string",
11376+
"title": "Abort Href"
11377+
}
11378+
},
11379+
"type": "object",
11380+
"required": [
11381+
"task_id",
11382+
"task_name",
11383+
"status_href",
11384+
"result_href",
11385+
"abort_href"
11386+
],
11387+
"title": "TaskGet"
11388+
},
11389+
"TaskProgress": {
11390+
"properties": {
11391+
"task_id": {
11392+
"anyOf": [
11393+
{
11394+
"type": "string"
11395+
},
11396+
{
11397+
"type": "null"
11398+
}
11399+
],
11400+
"title": "Task Id"
11401+
},
11402+
"message": {
11403+
"type": "string",
11404+
"title": "Message",
11405+
"default": ""
11406+
},
11407+
"percent": {
11408+
"type": "number",
11409+
"maximum": 1.0,
11410+
"minimum": 0.0,
11411+
"title": "Percent",
11412+
"default": 0.0
11413+
}
11414+
},
11415+
"type": "object",
11416+
"title": "TaskProgress",
11417+
"description": "Helps the user to keep track of the progress. Progress is expected to be\ndefined as a float bound between 0.0 and 1.0"
11418+
},
11419+
"TaskResult": {
11420+
"properties": {
11421+
"result": {
11422+
"anyOf": [
11423+
{},
11424+
{
11425+
"type": "null"
11426+
}
11427+
],
11428+
"title": "Result"
11429+
},
11430+
"error": {
11431+
"anyOf": [
11432+
{},
11433+
{
11434+
"type": "null"
11435+
}
11436+
],
11437+
"title": "Error"
11438+
}
11439+
},
11440+
"type": "object",
11441+
"required": [
11442+
"result",
11443+
"error"
11444+
],
11445+
"title": "TaskResult"
11446+
},
11447+
"TaskStatus": {
11448+
"properties": {
11449+
"task_progress": {
11450+
"$ref": "#/components/schemas/TaskProgress"
11451+
},
11452+
"done": {
11453+
"type": "boolean",
11454+
"title": "Done"
11455+
},
11456+
"started": {
11457+
"anyOf": [
11458+
{
11459+
"type": "string",
11460+
"format": "date-time"
11461+
},
11462+
{
11463+
"type": "null"
11464+
}
11465+
],
11466+
"title": "Started"
11467+
}
11468+
},
11469+
"type": "object",
11470+
"required": [
11471+
"task_progress",
11472+
"done",
11473+
"started"
11474+
],
11475+
"title": "TaskStatus"
11476+
},
1111711477
"UnitExtraInfoTier": {
1111811478
"properties": {
1111911479
"CPU": {

services/api-server/src/simcore_service_api_server/api/routes/tasks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
AsyncJobNameData,
1414
)
1515
from models_library.products import ProductName
16-
from models_library.rest_error import ErrorGet
1716
from models_library.users import UserID
1817
from servicelib.fastapi.dependencies import get_app
1918
from simcore_service_api_server.models.schemas.tasks import ApiServerEnvelope
2019

20+
from ...models.schemas.errors import ErrorGet
2121
from ...services_rpc.async_jobs import AsyncJobClient
2222
from ..dependencies.authentication import get_current_user_id
2323
from ..dependencies.services import get_product_name

0 commit comments

Comments
 (0)