mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-11-11 19:45:06 +00:00
feat(api): expose choice values and multiple flag in service cli_params
This commit is contained in:
@@ -251,6 +251,9 @@ async def services(request: web.Request) -> web.Response:
|
||||
param_info["default"] = default
|
||||
param_info["help"] = getattr(param, "help", None)
|
||||
param_info["type"] = param.type.name if hasattr(param.type, "name") else str(param.type)
|
||||
if isinstance(param.type, click.Choice):
|
||||
param_info["choices"] = list(param.type.choices)
|
||||
param_info["multiple"] = getattr(param, "multiple", False)
|
||||
cli_params.append(param_info)
|
||||
service_data["cli_params"] = cli_params
|
||||
|
||||
|
||||
Reference in New Issue
Block a user