Commit d3af9a36 authored by Michele Carignani's avatar Michele Carignani

CI job to validate openapi syntax of the definitions

Change-Id: I635814cd5284fbd11586536008e8d2561b4adf5c
Signed-off-by: Michele Carignani's avatarMichele Carignani <michele.carignani@etsi.org>
parent 17ad3db2
#!/bin/bash
specfiles=$(ls | egrep "^[^.]*.(json|yaml)")
fres=0
for i in $specfiles ; do
echo "-- Validating OpenAPI file $i..."
swagger-tools validate $i
res=$?
fres=$(($fres||$res))
echo -e "-- Validator returned $res.\n"
done
echo "-- Final validator returns $fres."
exit $fres
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment