Skip to content

Commit

Permalink
remove --null=null for call that doesn't require args
Browse files Browse the repository at this point in the history
Signed-off-by: Matthias Gatto <[email protected]>
  • Loading branch information
outscale-mgo committed Dec 24, 2024
1 parent fd9d938 commit 626c598
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cognac_gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,11 @@ replace_args()
echo -en $D1
local caml_x=$(bin/path_to_camelcase "$x")
local required=$(bin/get_argument_list osc-api.json "${x}${FUNCTION_SUFFIX}" --require)
local usage_required=$( for a in $(echo $required | tr -d ','); do echo -n " --${a}=${a,,}"; done )
if [[ $required == "null" ]]; then
usage_required=""
else
usage_required=$( for a in $(echo $required | tr -d ','); do echo -n " --${a}=${a,,}"; done )
fi
local usage="\"Usage: oapi-cli $caml_x ${usage_required} [OPTIONS]\n\""
local call_desc=$(jq .paths.\""/$x"\".description < osc-api.json | sed 's/<br \/>//g' | tr -d '"' | fold -s | sed 's/^/"/;s/$/\\n"/')

Expand Down

0 comments on commit 626c598

Please sign in to comment.