Skip to content

Align OpenAPI with OWASP Spectral rules#71

Merged
kennethaasan merged 5 commits intomainfrom
chore/fix-spectral
Jan 2, 2026
Merged

Align OpenAPI with OWASP Spectral rules#71
kennethaasan merged 5 commits intomainfrom
chore/fix-spectral

Conversation

@kennethaasan
Copy link
Owner

@kennethaasan kennethaasan commented Jan 2, 2026

Summary

  • add OWASP Spectral + OWASP API Governance rulesets for linting
  • tighten OpenAPI with standard error responses, rate-limit/CORS headers, and schema limits
  • update tests + generated OpenAPI types; exclude build output from tsconfig

Testing

  • npm run spectral
  • npx spectral lint openapi.yaml --fail-severity=warn
  • npm run lint (warns about baseline-browser-mapping age)
  • npm run tsc
  • npm run test

@github-actions
Copy link

github-actions bot commented Jan 2, 2026

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 87.74% (🎯 75%) 4491 / 5118
🔵 Statements 87.74% (🎯 75%) 4491 / 5118
🔵 Functions 82.47% (🎯 85%) 160 / 194
🔵 Branches 81.23% (🎯 75%) 632 / 778
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/app/page.tsx 100% 100% 100% 100%
src/app/api/fettmattis/route.ts 48.97% 60% 50% 48.97% 19-70, 81-87, 95-101, 108, 161-172
src/app/api/fettmattis/[fettmattisId]/route.ts 52.08% 40% 100% 52.08% 17-22, 28-31, 44-56
src/app/api/leaderboard/fettmattis/route.ts 0% 0% 0% 0% 1-49
src/app/rounds/rounds-client.tsx 85.62% 65.71% 25% 85.62% 133-141, 160-162, 176-178, 192-199, 201-203, 209-213, 215-217, 221-222, 225-226, 230, 235, 282-284, 323, 353-355, 385-387
src/components/Leaderboard.tsx 97.89% 86.53% 88.88% 97.89% 89, 180-181, 190, 281-283
src/components/fettmattis-table.tsx 93.9% 76% 80% 93.9% 59, 68-75, 174
src/lib/db-client.ts 91.98% 74.65% 96.87% 91.98% 89, 111, 120-121, 126-127, 134-135, 174-175, 198, 200-208, 224-225, 253-254, 263-264, 348-349, 376-377, 402-403, 408-409, 502-503, 532-533, 552-553, 592-593, 618-619, 777-778, 782-783, 880-881, 885-886
src/lib/api/fettmattis-client.ts 100% 100% 100% 100%
src/lib/api/generated.ts 100% 100% 100% 100%
src/lib/api/response-helpers.ts 100% 100% 100% 100%
src/lib/api/schemas.ts 99.28% 75% 100% 99.28% 114
src/lib/db/schema.ts 100% 100% 100% 100%
Generated in workflow #250 for commit 30a9ad3 by the Vitest Coverage Report Action

@kennethaasan kennethaasan changed the title chore: fix Spectral warnings Align OpenAPI with OWASP Spectral rules Jan 2, 2026
@kennethaasan kennethaasan merged commit 3f0975d into main Jan 2, 2026
10 checks passed
@kennethaasan kennethaasan deleted the chore/fix-spectral branch January 2, 2026 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant