Skip to content

Commit

Permalink
Type workflow id path parameter of invoke operation
Browse files Browse the repository at this point in the history
  • Loading branch information
heisner-tillman committed Feb 17, 2024
1 parent 67ab908 commit 7344676
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions lib/galaxy/webapps/galaxy/api/workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
)
from gxformat2._yaml import ordered_dump
from markupsafe import escape
from pydantic import (
UUID1,
UUID4,
)
from starlette.responses import StreamingResponse
from typing_extensions import Annotated

Expand Down Expand Up @@ -812,6 +816,15 @@ def __get_stored_workflow(self, trans, workflow_id, **kwd):
),
]

MultiTypeWorkflowIDPathParam = Annotated[
Union[UUID4, UUID1, DecodedDatabaseIdField],
Path(
...,
title="Workflow ID",
description="The database identifier - UUID or encoded - of the Workflow..",
),
]

DeletedQueryParam: bool = Query(
default=False, title="Display deleted", description="Whether to restrict result to deleted workflows."
)
Expand Down Expand Up @@ -1066,9 +1079,9 @@ def undelete_workflow(
)
def invoke(
self,
# workflow_id: StoredWorkflowIDPathParam,
payload: InvokeWorkflowBody,
workflow_id: str = Path(...),
# workflow_id: str = Path(...),
workflow_id: MultiTypeWorkflowIDPathParam,
trans: ProvidesHistoryContext = DependsOnTrans,
) -> Union[WorkflowInvocationResponse, List[WorkflowInvocationResponse]]:
"""
Expand Down

0 comments on commit 7344676

Please sign in to comment.