From 545d6b75da415eb625e4640ab5dd906f58dd19fb Mon Sep 17 00:00:00 2001 From: heisner-tillman Date: Tue, 4 Jun 2024 17:48:02 +0200 Subject: [PATCH] Specify valid style types for query param of workflow_dict operation --- lib/galaxy/webapps/galaxy/api/workflows.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/galaxy/webapps/galaxy/api/workflows.py b/lib/galaxy/webapps/galaxy/api/workflows.py index 7fce5ea1e6e7..efc141c473f1 100644 --- a/lib/galaxy/webapps/galaxy/api/workflows.py +++ b/lib/galaxy/webapps/galaxy/api/workflows.py @@ -10,6 +10,7 @@ Any, Dict, List, + Literal, Optional, Union, ) @@ -784,7 +785,9 @@ def __get_stored_workflow(self, trans, workflow_id, **kwd): ) StyleQueryParam = Annotated[ - Optional[str], + Optional[ + Literal["export", "format2", "editor", "legacy", "instance", "run", "preview", "format2_wrapped_yaml", "ga"] + ], Query( title="Style of export", description="The default is 'export', which is meant to be used with workflow import endpoints. Other formats such as 'instance', 'editor', 'run' are tied to the GUI and should not be considered stable APIs. The default format for 'export' is specified by the admin with the `default_workflow_export_format` config option. Style can be specified as either 'ga' or 'format2' directly to be explicit about which format to download.",