Generate and verify openapi specs in source tree at api/openapi-spec

This commit is contained in:
mbohlool
2016-09-27 23:55:45 -07:00
parent 15fbbacc33
commit 35b5174bf1
7 changed files with 198 additions and 9 deletions

View File

@@ -158,6 +158,18 @@ else
fi
echo "${reset}"
echo -ne "Checking for openapi spec that need updating... "
if ! hack/verify-openapi-spec.sh > /dev/null; then
echo "${red}ERROR!"
echo "Openapi spec needs to be updated."
echo "To regenerate the spec, run:"
echo " hack/update-openapi-spec.sh"
exit_code=1
else
echo "${green}OK"
fi
echo "${reset}"
if [[ "${exit_code}" != 0 ]]; then
echo "${red}Aborting commit${reset}"
fi