Loading common-openapi/generateOpenapi.sh +14 −1 Original line number Diff line number Diff line Loading @@ -74,8 +74,21 @@ echo "$configs" | while read -r config; do fi # Find corresponding openapi name for this config new_name=$(echo "$project_section" | grep -B1 "config_file:.*$config" | grep "openapi_name" | sed 's/.*openapi_name:[[:space:]]*"\(.*\)".*/\1/') # First get the config block containing our config file config_block=$(echo "$project_section" | awk -v cfg="$config" ' /config_file:.*"'"$config"'"/ { # Print previous line (openapi_name) printf "%s\n", p # Print current line print } { p=$0 } ') # Then extract the openapi_name from it new_name=$(echo "$config_block" | grep "openapi_name" | sed 's/.*openapi_name:[[:space:]]*"\(.*\)".*/\1/') echo "Config block found:" echo "$config_block" echo "Found OpenAPI file name: $new_name" if [ ! -z "$new_name" ]; then Loading Loading
common-openapi/generateOpenapi.sh +14 −1 Original line number Diff line number Diff line Loading @@ -74,8 +74,21 @@ echo "$configs" | while read -r config; do fi # Find corresponding openapi name for this config new_name=$(echo "$project_section" | grep -B1 "config_file:.*$config" | grep "openapi_name" | sed 's/.*openapi_name:[[:space:]]*"\(.*\)".*/\1/') # First get the config block containing our config file config_block=$(echo "$project_section" | awk -v cfg="$config" ' /config_file:.*"'"$config"'"/ { # Print previous line (openapi_name) printf "%s\n", p # Print current line print } { p=$0 } ') # Then extract the openapi_name from it new_name=$(echo "$config_block" | grep "openapi_name" | sed 's/.*openapi_name:[[:space:]]*"\(.*\)".*/\1/') echo "Config block found:" echo "$config_block" echo "Found OpenAPI file name: $new_name" if [ ! -z "$new_name" ]; then Loading