2017-02-13 14:01:54 -05:00
|
|
|
#!/usr/bin/env bash
|
2016-11-03 13:15:27 -04:00
|
|
|
set -e
|
|
|
|
export SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
|
source "${SCRIPTDIR}/.validate"
|
|
|
|
|
|
|
|
IFS=$'\n'
|
|
|
|
files=( $(validate_diff --diff-filter=ACMR --name-only -- 'api/swagger.yaml' || true) )
|
|
|
|
unset IFS
|
|
|
|
|
2019-10-07 09:20:03 -04:00
|
|
|
if [ -n "${TEST_FORCE_VALIDATE:-}" ] || [ ${#files[@]} -gt 0 ]; then
|
|
|
|
LANG=C.UTF-8 yamllint -c "${SCRIPTDIR}"/.swagger-yamllint api/swagger.yaml
|
2019-08-02 09:58:33 -04:00
|
|
|
swagger validate api/swagger.yaml
|
2016-11-03 13:15:27 -04:00
|
|
|
fi
|