Skip to content
Snippets Groups Projects
Commit a6af2518 authored by fol0037's avatar fol0037
Browse files

Merge branch 'Fix/get-YAML-paths' into 'devel'

fixed get YAML endpoints

See merge request !17
parents 7ffef650 4bc763e1
No related branches found
No related tags found
3 merge requests!33NEW PROD PHASE merge,!18YAML endpoints path fix,!17fixed get YAML endpoints
Pipeline #4201 passed
......@@ -72,6 +72,10 @@ class CWLWfsBody(BaseModel):
project_shortname: str
yaml_content: str
class CWLWfsPath(BaseModel):
project_shortname: str
wf_id: str
@cwl_wfs_api.get("/", responses={"201": EndpointResponse})
def index():
......@@ -253,13 +257,16 @@ def update_cwl(body: CWLWfsBody):
return ResponseMessages.bad_server()
@cwl_wfs_api.post("/get-cwl-workflow/<project_shortname>/<wf_id>", responses={"201": EndpointResponse,
"400": EndpointResponse,
"401": EndpointResponse,
"403": EndpointResponse,
"500": EndpointResponse})
@cwl_wfs_api.get("/get-cwl-workflow/<string:project_shortname>/<string:wf_id>", responses={"201": EndpointResponse,
"400": EndpointResponse,
"401": EndpointResponse,
"403": EndpointResponse,
"500": EndpointResponse})
@requires_authentication
def get_cwl_wf(project_shortname: str, wf_id: str):
def get_cwl_wf(path: CWLWfsPath):
project_shortname: str = path.project_shortname
wf_id: str = path.wf_id
log.debug(f"project_shortname: {project_shortname}, wf_id: {wf_id}")
......
......@@ -75,6 +75,10 @@ class TOSCAWfsBody(BaseModel):
project_shortname: str
yaml_content: str
class TOSCAWfsPath(BaseModel):
project_shortname: str
wf_id: str
@tosca_wfs_api.get("/", responses={"201": EndpointResponse})
def index():
......@@ -254,13 +258,16 @@ def update_yaml_tosca(body: TOSCAWfsBody):
return ResponseMessages.bad_server()
@tosca_wfs_api.post("/get-tosca-yaml-workflow/<project_shortname>/<wf_id>", responses={"201": EndpointResponse,
"400": EndpointResponse,
"401": EndpointResponse,
"403": EndpointResponse,
"500": EndpointResponse})
@tosca_wfs_api.get("/get-tosca-yaml-workflow/<string:project_shortname>/<string:wf_id>", responses={"201": EndpointResponse,
"400": EndpointResponse,
"401": EndpointResponse,
"403": EndpointResponse,
"500": EndpointResponse})
@requires_authentication
def get_tosca_yaml_wf(project_shortname: str, wf_id: str):
def get_tosca_yaml_wf(path: TOSCAWfsPath):
project_shortname: str = path.project_shortname
wf_id: str = path.wf_id
log.debug(f"project_short: {project_shortname}, wf_id: {wf_id}")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment