File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -298,12 +298,14 @@ class format_tdl : format_base
298298 ++positional_option_count;
299299 auto description = config.description + default_message + validator_message;
300300
301- parameters.push_back (tdl::Node{
302- .name = id,
303- .description = description,
304- .tags = {},
305- .value = tdl::StringValue{},
306- });
301+ parameters.push_back (tdl::Node{.name = id,
302+ .description = description,
303+ .tags = {detail::is_container_option<option_type> ? " " : " required" }});
304+
305+ if constexpr (detail::is_container_option<option_type>)
306+ parameters.back ().value = tdl::StringValueList{};
307+ else
308+ parameters.back ().value = tdl::StringValue{};
307309 });
308310 }
309311
Original file line number Diff line number Diff line change @@ -85,10 +85,10 @@ TEST(format_cwl_test, full_information)
8585 " inputs:\n "
8686 " positional_0:\n "
8787 " doc: this is a positional option.\n "
88- " type: string? \n "
88+ " type: string\n "
8989 " positional_1:\n "
9090 " doc: \" this is a positional option. Default: []\"\n "
91- " type: string?\n "
91+ " type: string[] ?\n "
9292 " int:\n "
9393 " doc: \" this is a int option. Default: 5\"\n "
9494 " type: long?\n "
@@ -215,10 +215,10 @@ TEST(format_cwl_test, subparser)
215215 " inputs:\n "
216216 " positional_0:\n "
217217 " doc: this is a positional option.\n "
218- " type: string? \n "
218+ " type: string\n "
219219 " positional_1:\n "
220220 " doc: \" this is a positional option. Default: []\"\n "
221- " type: string?\n "
221+ " type: string[] ?\n "
222222 " int:\n "
223223 " doc: \" this is a int option. Default: 5\"\n "
224224 " type: long?\n "
You can’t perform that action at this time.
0 commit comments