yamllint does not report invalid indentation. libfyaml passes the yaml test suite and catches these issues. not replacing yamllint to preserve existing style rules. Signed-off-by: Florian Stellbrink <flo@stellbr.ink>
18 lines
356 B
Bash
Executable File
18 lines
356 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -e
|
|
|
|
# Expected to be in api directory
|
|
cd "$(dirname "${BASH_SOURCE[0]}")/.."
|
|
|
|
echo "Validating swagger.yaml..."
|
|
|
|
fy-tool --yaml-1.2 --null-output swagger.yaml
|
|
yamllint -f parsable -c validate/yamllint.yaml swagger.yaml
|
|
|
|
if out=$(swagger validate swagger.yaml); then
|
|
echo "Validation done! ${out}"
|
|
else
|
|
echo "${out}" >&2
|
|
false
|
|
fi
|