From a784c3c161b4c6107ad1644cc923fc942af7d8f8 Mon Sep 17 00:00:00 2001 From: Vessel9817 <151808241+Vessel9817@users.noreply.github.com> Date: Sat, 7 Feb 2026 23:00:18 -0500 Subject: [PATCH 1/3] CI: Check if all paths inside `paths/` are included in `paths.yml` Fixes #313 Signed-off-by: Vessel9817 <151808241+Vessel9817@users.noreply.github.com> --- .github/workflows/ci.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 18f8bd4d..28416599 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -74,6 +74,27 @@ jobs: continue-on-error: true run: pnpm run lint-ci + # Will fail if no paths are defined + - name: assert no unused paths + if: env.changes != '' + run: | + status=0 + mapfile -t expected <<< "$(yq -re '.paths | keys' openapi/components/paths/*.yaml | yq -r 'sort_by(.) | .[]')" + mapfile -t actual <<< "$(yq -re 'sort_by(keys) | keys[]' openapi/components/paths.yaml)" + + for ((i = 0, j = 0; i < "${#expected[@]}"; i++)); do + if [[ "${expected[$i]}" == "${actual[$j]}" ]]; then + j=$((j + 1)) + else + status=2 + echo "Missing path: ${expected[$i]}" >&2; + fi + done; + + if [[ "$status" -ne 0 ]]; then + exit "$status" + fi + bundle: runs-on: ubuntu-latest steps: From a9b4163d95434bcb7ac57ae6ecfb4bfae2c510e9 Mon Sep 17 00:00:00 2001 From: jellejurre Date: Mon, 9 Feb 2026 13:16:18 +0100 Subject: [PATCH 2/3] Remove path as test --- openapi/components/paths.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/openapi/components/paths.yaml b/openapi/components/paths.yaml index 2e9a6cd6..7ccd04ef 100644 --- a/openapi/components/paths.yaml +++ b/openapi/components/paths.yaml @@ -8,8 +8,6 @@ $ref: "./paths/economy.yaml#/paths/~1Steam~1transactions~1{transactionId}" "/adminassetbundles/{adminAssetBundleId}": $ref: "./paths/files.yaml#/paths/~1adminassetbundles~1{adminAssetBundleId}" -/agreement: - $ref: "./paths/files.yaml#/paths/~1agreement" "/analysis/{fileId}/{versionId}": $ref: "./paths/files.yaml#/paths/~1analysis~1{fileId}~1{versionId}" "/analysis/{fileId}/{versionId}/security": From 84aee8c42da5b3d51f229a842dadfe24e9d58d89 Mon Sep 17 00:00:00 2001 From: jellejurre Date: Mon, 9 Feb 2026 13:20:29 +0100 Subject: [PATCH 3/3] Put back path --- openapi/components/paths.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openapi/components/paths.yaml b/openapi/components/paths.yaml index 7ccd04ef..2e9a6cd6 100644 --- a/openapi/components/paths.yaml +++ b/openapi/components/paths.yaml @@ -8,6 +8,8 @@ $ref: "./paths/economy.yaml#/paths/~1Steam~1transactions~1{transactionId}" "/adminassetbundles/{adminAssetBundleId}": $ref: "./paths/files.yaml#/paths/~1adminassetbundles~1{adminAssetBundleId}" +/agreement: + $ref: "./paths/files.yaml#/paths/~1agreement" "/analysis/{fileId}/{versionId}": $ref: "./paths/files.yaml#/paths/~1analysis~1{fileId}~1{versionId}" "/analysis/{fileId}/{versionId}/security":