Skip to content

Commit d580d99

Browse files
committed
update openapi.json
1 parent eef3eef commit d580d99

File tree

2 files changed

+26
-28
lines changed

2 files changed

+26
-28
lines changed

api/openapi.json

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7704,35 +7704,33 @@
77047704
"properties": {
77057705
"id": {
77067706
"type": "string",
7707-
"pattern": "^simcore/services/dynamic/([a-z0-9][a-z0-9_.-]*/)*([a-z0-9-_]+[a-z0-9])$",
77087707
"title": "Id",
7709-
"description": "Program identifier"
7708+
"description": "Resource identifier"
77107709
},
77117710
"version": {
77127711
"type": "string",
77137712
"pattern": "^(0|[1-9]\\d*)(\\.(0|[1-9]\\d*)){2}(-(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*)(\\.(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*))*)?(\\+[-\\da-zA-Z]+(\\.[-\\da-zA-Z-]+)*)?$",
77147713
"title": "Version",
7715-
"description": "semantic version number of the node"
7714+
"description": "Semantic version number of the resource"
77167715
},
77177716
"title": {
77187717
"type": "string",
7718+
"maxLength": 100,
77197719
"title": "Title",
77207720
"description": "Human readable name"
77217721
},
77227722
"description": {
77237723
"anyOf": [
77247724
{
7725-
"type": "string"
7725+
"type": "string",
7726+
"maxLength": 500
77267727
},
77277728
{
77287729
"type": "null"
77297730
}
77307731
],
7731-
"title": "Description"
7732-
},
7733-
"maintainer": {
7734-
"type": "string",
7735-
"title": "Maintainer"
7732+
"title": "Description",
7733+
"description": "Description of the resource"
77367734
},
77377735
"url": {
77387736
"anyOf": [
@@ -7755,11 +7753,10 @@
77557753
"id",
77567754
"version",
77577755
"title",
7758-
"maintainer",
77597756
"url"
77607757
],
77617758
"title": "Program",
7762-
"description": "A released solver with a specific version",
7759+
"description": "A released program with a specific version",
77637760
"example": {
77647761
"description": "Simulation framework",
77657762
"id": "simcore/services/dynamic/sim4life",
@@ -7838,35 +7835,33 @@
78387835
"properties": {
78397836
"id": {
78407837
"type": "string",
7841-
"pattern": "^simcore/services/comp/([a-z0-9][a-z0-9_.-]*/)*([a-z0-9-_]+[a-z0-9])$",
78427838
"title": "Id",
7843-
"description": "Solver identifier"
7839+
"description": "Resource identifier"
78447840
},
78457841
"version": {
78467842
"type": "string",
78477843
"pattern": "^(0|[1-9]\\d*)(\\.(0|[1-9]\\d*)){2}(-(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*)(\\.(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*))*)?(\\+[-\\da-zA-Z]+(\\.[-\\da-zA-Z-]+)*)?$",
78487844
"title": "Version",
7849-
"description": "semantic version number of the node"
7845+
"description": "Semantic version number of the resource"
78507846
},
78517847
"title": {
78527848
"type": "string",
7849+
"maxLength": 100,
78537850
"title": "Title",
78547851
"description": "Human readable name"
78557852
},
78567853
"description": {
78577854
"anyOf": [
78587855
{
7859-
"type": "string"
7856+
"type": "string",
7857+
"maxLength": 500
78607858
},
78617859
{
78627860
"type": "null"
78637861
}
78647862
],
7865-
"title": "Description"
7866-
},
7867-
"maintainer": {
7868-
"type": "string",
7869-
"title": "Maintainer"
7863+
"title": "Description",
7864+
"description": "Description of the resource"
78707865
},
78717866
"url": {
78727867
"anyOf": [
@@ -7882,15 +7877,20 @@
78827877
],
78837878
"title": "Url",
78847879
"description": "Link to get this resource"
7880+
},
7881+
"maintainer": {
7882+
"type": "string",
7883+
"title": "Maintainer",
7884+
"description": "Maintainer of the solver"
78857885
}
78867886
},
78877887
"type": "object",
78887888
"required": [
78897889
"id",
78907890
"version",
78917891
"title",
7892-
"maintainer",
7893-
"url"
7892+
"url",
7893+
"maintainer"
78947894
],
78957895
"title": "Solver",
78967896
"description": "A released solver with a specific version",

programs_example.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,17 @@ def osparc_client():
1818
config = osparc.Configuration(
1919
host=user.host, username=user.key, password=user.secret
2020
)
21-
print(config.host)
22-
print(config.username)
23-
print(config.password)
2421
return osparc.ApiClient(config)
2522

2623

2724
def check_credentials():
2825
with osparc_client() as api_client:
2926
user_api = osparc.UsersApi(api_client)
30-
print(user_api.get_my_profile())
27+
profile = user_api.get_my_profile()
28+
print(profile.model_dump_json(indent=2))
3129

3230

33-
async def run(program_key: str, version: str) -> osparc.JobStatus:
31+
async def run(program_key: str, version: str):
3432
with osparc_client() as api_client:
3533
files_api = osparc.FilesApi(api_client)
3634
programs_api = osparc.ProgramsApi(api_client)
@@ -42,7 +40,7 @@ async def run(program_key: str, version: str) -> osparc.JobStatus:
4240
program_job = programs_api.create_program_job(
4341
program_key=program.id, version=program.version
4442
)
45-
print(f"{program_job=}")
43+
print(program_job.model_dump_json(indent=2))
4644

4745
with TemporaryDirectory() as tmp_dir:
4846
# Upload the input file

0 commit comments

Comments
 (0)