We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
paths/
paths.yml
1 parent e138794 commit e802399Copy full SHA for e802399
1 file changed
.github/workflows/ci.yaml
@@ -74,6 +74,27 @@ jobs:
74
continue-on-error: true
75
run: pnpm run lint-ci
76
77
+ # Will fail if no paths are defined
78
+ - name: assert no unused paths
79
+ if: env.changes != ''
80
+ run: |
81
+ status=0
82
+ mapfile -t expected <<< "$(yq -re '.paths | keys' openapi/components/paths/*.yaml | yq -r 'sort_by(.) | .[]')"
83
+ mapfile -t actual <<< "$(yq -re 'sort_by(keys) | keys[]' openapi/components/paths.yaml)"
84
+
85
+ for ((i = 0, j = 0; i < "${#expected[@]}"; i++)); do
86
+ if [[ "${expected[$i]}" == "${actual[$j]}" ]]; then
87
+ j=$((j + 1))
88
+ else
89
+ status=2
90
+ echo "Missing path: ${expected[$i]}" >&2;
91
+ fi
92
+ done;
93
94
+ if [[ "$status" -ne 0 ]]; then
95
+ exit "$status"
96
97
98
bundle:
99
runs-on: ubuntu-latest
100
steps:
0 commit comments