🚀 Issue: Strict Swagger Documentation for Auth Module
📋 Description
Begin improving and enforcing strict Swagger documentation for the API by starting with the auth module. Every route, payload, parameter, and response must be documented thoroughly and accurately following OpenAPI 3.0+ standards. This task will act as a base for future documentation of all other modules.
🎯 Objectives
- Document all
auth endpoints located in both /api/v1/auth/ and /auth/ (if legacy)
- Define all request and response schemas in the OpenAPI spec (
openapi.yaml)
- Add precise descriptions, examples, and status code documentation
- Ensure consistency with existing DTOs and TypeScript types
- Align field descriptions with domain vocabulary (wallet, roles, token, etc.)
📁 Files to edit
/openapi.yaml // Centralized OpenAPI spec file
/src/modules/auth/dto/ // Ensure matching with DTOs
/src/modules/auth/presentation/ // Controller methods to document
📌 Endpoints to Document (Auth)
POST /api/v1/auth/register
POST /api/v1/auth/login
POST /api/v1/auth/verify-email
POST /api/v1/auth/resend-verification
GET /api/v1/auth/verification-status
POST /api/v1/auth/verify-wallet
POST /api/v1/auth/validate-wallet-format
🧪 Acceptance Criteria
🔗 References
⚠️ Notes
- Use YAML anchors if needed to avoid duplication of schemas
- Use
components.schemas to define all payloads clearly
- This task must be completed before moving on to documenting other modules (project, user, volunteer, etc.)
📘 Example Schema Block (in openapi.yaml)
components:
schemas:
RegisterRequest:
type: object
required:
- walletAddress
- name
- email
- role
properties:
walletAddress:
type: string
example: "GCKFBEI..."
role:
type: string
enum: [buyer, seller]
example: "buyer"
name:
type: string
example: "John Doe"
email:
type: string
example: "john@example.com"
🚀 Issue: Strict Swagger Documentation for Auth Module
📋 Description
Begin improving and enforcing strict Swagger documentation for the API by starting with the
authmodule. Every route, payload, parameter, and response must be documented thoroughly and accurately following OpenAPI 3.0+ standards. This task will act as a base for future documentation of all other modules.🎯 Objectives
authendpoints located in both/api/v1/auth/and/auth/(if legacy)openapi.yaml)📁 Files to edit
📌 Endpoints to Document (Auth)
POST
/api/v1/auth/registerSummary: Register a new user
Request Body:
walletAddress: string, requiredrole: enum('buyer' | 'seller'), requiredname: string, requiredemail: string, requiredResponse:
200: success message, user object400: validation errorPOST
/api/v1/auth/loginSummary: Log in with wallet address
Request Body:
walletAddress: string, requiredResponse:
200: JWT token401: unauthorizedPOST
/api/v1/auth/verify-emailSummary: Verify email using token
Request Param:
token: stringResponse:
200: verification success400: invalid or expired tokenPOST
/api/v1/auth/resend-verificationSummary: Resend verification email
Request Body:
email: string, requiredResponse:
200: resend confirmation404: user not foundGET
/api/v1/auth/verification-statusSummary: Check if current user’s email is verified
Auth: Requires Bearer token
Response:
200: boolean verified flag401: not authenticatedPOST
/api/v1/auth/verify-walletSummary: Fully verify a Stellar wallet address
Request Body:
walletAddress: stringResponse:
200: wallet metadata400: invalid format or unregisteredPOST
/api/v1/auth/validate-wallet-formatSummary: Validate wallet address format only
Request Body:
walletAddress: stringResponse:
200: valid/invalid format🧪 Acceptance Criteria
openapi.yaml🔗 References
src/modules/auth/dto/*.tsfor structure alignmentopenapi.yamlfile at root of projectcomponents.schemasto define all payloads clearly📘 Example Schema Block (in openapi.yaml)