Commit c56d8bd4 authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

Fix messages in log file

parent afd9b1c2
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -16,15 +16,18 @@ LOG=""
ERR=""
for i in specs/*.yaml
do
    echo -e "----  Validating $i ...  "
    echo -e "----  Validating $i ...  " | tee -a $LOG
	MSG=$(swagger-cli validate "$i" 2>&1)
    #MSG=$(validate "$i" 2>&1)
	res=$?
    echo "$MSG"
    #echo "$MSG"
    if [ ! $res == 0 ] ; then 
        ERR="$ERR$MSG\n"
        echo -e "invalid\n$MSG" | tee -a $LOG
        ERR="$ERR\nFile $i: $MSG\n"
    else
        echo -e "valid" | tee -a $LOG
    fi 
    LOG="$LOG$MSG\n"
    #LOG="$LOG$MSG\n"
    fres=$(($fres||$res))
done
echo -e "\n-- Final validator returns $fres." | tee -a $LOGFILE