Skip to content

Commit

Permalink
fix broken array type parsing
Browse files Browse the repository at this point in the history
Signed-off-by: Matthias Gatto <matthias.gatto@outscale.com>
  • Loading branch information
outscale-mgo committed Jul 26, 2024
1 parent 3183c1e commit 0a5617f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ get_type_direct() {
elif [ "$sub_type" == 'null' ]; then
local osub_ref=$(json-search -R '$ref' <<< ${arg_info})
local sub_ref=$(cut -d '/' -f 4 <<< $osub_ref 2> /dev/null)
local sub_ref_properties=$(jq $osub_ref.properties < osc-api.json 2> /dev/null)
osub_ref=$(cut -c 2- <<< $osub_ref | sed 's|/|.|g')
if [ "$sub_ref_properties" == '' ]; then
local sub_ref_properties=$(jq $osub_ref.properties < osc-api.json 2> /dev/null)
if [ "$sub_ref_properties" == 'null' ] || [ "$sub_ref_properties" == '' ]; then
local arg_info="$(jq $osub_ref < osc-api.json)"
local dtypes=$(json-search $limit -R type 2> /dev/null <<< $arg_info)
types="array $dtypes"
Expand Down

0 comments on commit 0a5617f

Please sign in to comment.