Skip to content

fix(backend): add OpenAPI 3.0 annotations for authentication routes - #1374

Merged
spideydotjs merged 1 commit into
mainfrom
fix/swagger-auth-annotations-1369
Oct 19, 2026
Merged

spideydotjs merged 1 commit into
mainfrom
fix/swagger-auth-annotations-1369

Conversation

@spideydotjs

Copy link
Copy Markdown
Collaborator

📌 Overview

This PR adds missing OpenAPI / Swagger 3.0 JSDoc annotations to backend/routes/authRoutes.js.

Previously, tests/swaggerDoc.test.js failed because /api/auth/register and /api/auth/login were not indexed in swaggerSpec.paths. Adding these annotations documents registration, login, token refresh, and logout in the interactive documentation at /api/docs and fixes the test suite.

🔗 Related Issue

Closes #1369

🧪 Testing & Verification

  • node -c backend/routes/authRoutes.js (passed)
  • npx jest tests/swaggerDoc.test.js (4/4 tests passed)

- Add JSDoc @Swagger specifications for /api/auth/register, /api/auth/login, /api/auth/refresh, and /api/auth/logout
- Fix tests/swaggerDoc.test.js path validation check

Closes #1369
@vercel

vercel Bot commented Oct 19, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
crop-chain Error Error Oct 19, 2026 4:05pm UTC

@github-actions

Copy link
Copy Markdown

🚀 Impressive! A new contribution to CropChain!

Thank you for your Pull Request. To help us merge this smoothly, please ensure:

  • Tests Pass: You have run npx hardhat test for contract changes.
  • Security: No .env files or private keys are committed.
  • UI Standards: Any frontend changes follow our 'Apple-level' design system.
  • Documentation: You've updated the README if you added new environment variables.

We will review your code soon. Happy building! 🌾✨

@spideydotjs
spideydotjs merged commit 6d55d7e into main Oct 19, 2026
12 of 22 checks passed
@spideydotjs
spideydotjs deleted the fix/swagger-auth-annotations-1369 branch October 19, 2026 16:05

This branch had an error being deployed

1 failed deployment
Preview — 031342af Deployed Oct 19, 2026 by vercel[bot]
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.

[BUG] Swagger route coverage test fails due to missing OpenAPI annotations in authRoutes.js

2 participants