github.com/duglin/docker@v1.13.1/hack/validate/swagger (about) 1 #!/bin/bash 2 set -e 3 export SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 4 source "${SCRIPTDIR}/.validate" 5 6 IFS=$'\n' 7 files=( $(validate_diff --diff-filter=ACMR --name-only -- 'api/swagger.yaml' || true) ) 8 unset IFS 9 10 if [ ${#files[@]} -gt 0 ]; then 11 yamllint -c ${SCRIPTDIR}/.swagger-yamllint api/swagger.yaml 12 swagger validate api/swagger.yaml 13 fi