{
  "openapi": "3.0.0",
  "info": {
    "title": "Employee Engagement Platform API",
    "description": "Complete API documentation for Employee Engagement Platform with Super Admin, Admin and Employee roles. Use this for testing and integration.",
    "version": "1.0.0",
    "contact": {
      "name": "API Support",
      "email": "support@employeeengagement.com"
    }
  },
  "servers": [
    {
      "url": "http://localhost:8000/api/v1",
      "description": "Local Development Server"
    },
    {
      "url": "https://postcerebral-bess-papaveraceous.ngrok-free.dev/api/v1",
      "description": "Ngrok Tunnel Server (Live for External Teams)"
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "Enter the Bearer token received from login endpoints"
      }
    },
    "schemas": {
      "User": {
        "type": "object",
        "properties": {
          "id": {"type": "integer", "example": 1},
          "name": {"type": "string", "example": "John Doe"},
          "email": {"type": "string", "example": "john@company.com"},
          "role": {"type": "string", "example": "employee"},
          "status": {"type": "string", "example": "active"},
          "total_points": {"type": "integer", "example": 150},
          "department_id": {"type": "integer", "example": 1},
          "team_id": {"type": "integer", "example": 1}
        }
      },
      "Admin": {
        "type": "object",
        "properties": {
          "id": {"type": "integer", "example": 1},
          "name": {"type": "string", "example": "HR Manager"},
          "email": {"type": "string", "example": "hr@company.com"},
          "role": {"type": "string", "enum": ["super_admin", "hr_admin", "sub_admin"]},
          "status": {"type": "string", "enum": ["active", "inactive"]},
          "permissions": {"type": "array", "items": {"type": "string"}}
        }
      }
    }
  },
  "security": [{"bearerAuth": []}],
  "tags": [
    {"name": "Authentication", "description": "Login/Logout endpoints for all user types"},
    {"name": "Super Admin", "description": "Super Admin exclusive operations"},
    {"name": "Admin Management", "description": "Admin operations (Admin + Super Admin)"},
    {"name": "Employee Features", "description": "Employee self-service features"},
    {"name": "Testing", "description": "Test endpoints and utilities"}
  ],
  "paths": {
    "/auth/register": {
      "post": {
        "tags": ["Authentication"],
        "summary": "Employee Registration",
        "description": "Register a new employee user",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["name", "email", "password", "password_confirmation"],
                "properties": {
                  "name": {"type": "string", "example": "John Doe"},
                  "email": {"type": "string", "format": "email", "example": "john@company.com"},
                  "password": {"type": "string", "format": "password", "example": "password123"},
                  "password_confirmation": {"type": "string", "format": "password", "example": "password123"},
                  "phone_number": {"type": "string", "example": "+1234567890"},
                  "date_of_birth": {"type": "string", "format": "date", "example": "1990-01-15"}
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "User registered successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {"type": "boolean", "example": true},
                    "message": {"type": "string", "example": "User registered successfully"},
                    "data": {
                      "type": "object",
                      "properties": {
                        "user": {"$ref": "#/components/schemas/User"},
                        "token": {"type": "string", "example": "1|abc123def456..."},
                        "token_type": {"type": "string", "example": "Bearer"}
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/auth/login": {
      "post": {
        "tags": ["Authentication"],
        "summary": "Employee Login",
        "description": "Login for regular employees",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["email", "password"],
                "properties": {
                  "email": {"type": "string", "format": "email", "example": "john@company.com"},
                  "password": {"type": "string", "format": "password", "example": "password123"}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Login successful",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {"type": "boolean", "example": true},
                    "message": {"type": "string", "example": "Login successful"},
                    "data": {
                      "type": "object",
                      "properties": {
                        "user": {"$ref": "#/components/schemas/User"},
                        "token": {"type": "string", "example": "1|abc123def456..."},
                        "token_type": {"type": "string", "example": "Bearer"},
                        "role": {"type": "string", "example": "employee"}
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/auth/admin/login": {
      "post": {
        "tags": ["Authentication"],
        "summary": "Admin Login (HR Admin / Sub Admin)",
        "description": "Login for HR Admins and Sub Admins",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["email", "password"],
                "properties": {
                  "email": {"type": "string", "format": "email", "example": "hradmin@company.com"},
                  "password": {"type": "string", "format": "password", "example": "admin123"}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Admin login successful",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {"type": "boolean", "example": true},
                    "message": {"type": "string", "example": "Admin login successful"},
                    "data": {
                      "type": "object",
                      "properties": {
                        "admin": {"$ref": "#/components/schemas/Admin"},
                        "token": {"type": "string", "example": "1|abc123def456..."},
                        "token_type": {"type": "string", "example": "Bearer"},
                        "role": {"type": "string", "example": "hr_admin"}
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/auth/super-admin/login": {
      "post": {
        "tags": ["Authentication"],
        "summary": "Super Admin Login",
        "description": "Login for Super Admin (Highest privilege level)",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["email", "password"],
                "properties": {
                  "email": {"type": "string", "format": "email", "example": "superadmin@example.com"},
                  "password": {"type": "string", "format": "password", "example": "SuperAdmin@123"}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Super Admin login successful",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {"type": "boolean", "example": true},
                    "message": {"type": "string", "example": "Super Admin login successful"},
                    "data": {
                      "type": "object",
                      "properties": {
                        "admin": {"$ref": "#/components/schemas/Admin"},
                        "token": {"type": "string", "example": "1|abc123def456..."},
                        "token_type": {"type": "string", "example": "Bearer"},
                        "role": {"type": "string", "example": "super_admin"}
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/auth/logout": {
      "post": {
        "tags": ["Authentication"],
        "summary": "Logout (All Users)",
        "description": "Logout and invalidate current token",
        "responses": {
          "200": {
            "description": "Logout successful",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {"type": "boolean", "example": true},
                    "message": {"type": "string", "example": "Logout successful"}
                  }
                }
              }
            }
          }
        }
      }
    },
    "/auth/profile": {
      "get": {
        "tags": ["Authentication"],
        "summary": "Get Profile",
        "description": "Get current user profile information",
        "responses": {
          "200": {
            "description": "Profile retrieved successfully"
          }
        }
      },
      "put": {
        "tags": ["Authentication"],
        "summary": "Update Profile",
        "description": "Update current user profile",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {"type": "string", "example": "John Doe Updated"},
                  "phone_number": {"type": "string", "example": "+1234567890"},
                  "date_of_birth": {"type": "string", "format": "date", "example": "1990-01-15"}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Profile updated successfully"
          }
        }
      }
    },
    "/auth/change-password": {
      "put": {
        "tags": ["Authentication"],
        "summary": "Change Password",
        "description": "Change current user password",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["current_password", "new_password", "new_password_confirmation"],
                "properties": {
                  "current_password": {"type": "string", "format": "password"},
                  "new_password": {"type": "string", "format": "password"},
                  "new_password_confirmation": {"type": "string", "format": "password"}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Password changed successfully"
          }
        }
      }
    },
    "/super-admin/dashboard": {
      "get": {
        "tags": ["Super Admin"],
        "summary": "Super Admin Dashboard",
        "description": "Get super admin dashboard statistics and overview",
        "responses": {
          "200": {
            "description": "Dashboard data retrieved successfully"
          }
        }
      }
    },
    "/super-admin/admins": {
      "get": {
        "tags": ["Super Admin"],
        "summary": "Get All Admins",
        "description": "Retrieve list of all admins (excluding super admin)",
        "parameters": [
          {
            "name": "role",
            "in": "query",
            "description": "Filter by admin role",
            "schema": {
              "type": "string",
              "enum": ["hr_admin", "sub_admin"]
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "Filter by status",
            "schema": {
              "type": "string",
              "enum": ["active", "inactive"]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of admins retrieved successfully"
          }
        }
      },
      "post": {
        "tags": ["Super Admin"],
        "summary": "Create New Admin",
        "description": "Create a new HR Admin or Sub Admin",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["name", "email", "password", "role"],
                "properties": {
                  "name": {"type": "string", "example": "HR Manager"},
                  "email": {"type": "string", "format": "email", "example": "hr@company.com"},
                  "password": {"type": "string", "format": "password", "example": "password123"},
                  "role": {"type": "string", "enum": ["hr_admin", "sub_admin"], "example": "hr_admin"},
                  "permissions": {"type": "array", "items": {"type": "string"}},
                  "status": {"type": "string", "enum": ["active", "inactive"], "example": "active"}
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Admin created successfully"
          }
        }
      }
    },
    "/super-admin/admins/{id}": {
      "get": {
        "tags": ["Super Admin"],
        "summary": "Get Admin Details",
        "description": "Get specific admin details by ID",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {"type": "integer"}
          }
        ],
        "responses": {
          "200": {
            "description": "Admin details retrieved successfully"
          }
        }
      },
      "put": {
        "tags": ["Super Admin"],
        "summary": "Update Admin",
        "description": "Update admin information",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {"type": "integer"}
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {"type": "string"},
                  "email": {"type": "string", "format": "email"},
                  "password": {"type": "string", "format": "password"},
                  "role": {"type": "string", "enum": ["hr_admin", "sub_admin"]},
                  "status": {"type": "string", "enum": ["active", "inactive"]}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Admin updated successfully"
          }
        }
      },
      "delete": {
        "tags": ["Super Admin"],
        "summary": "Delete Admin",
        "description": "Delete an admin account",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {"type": "integer"}
          }
        ],
        "responses": {
          "200": {
            "description": "Admin deleted successfully"
          }
        }
      }
    },
    "/super-admin/stats": {
      "get": {
        "tags": ["Super Admin"],
        "summary": "Get System Statistics",
        "description": "Get comprehensive platform statistics",
        "responses": {
          "200": {
            "description": "System statistics retrieved successfully"
          }
        }
      }
    },
    "/admin/dashboard": {
      "get": {
        "tags": ["Admin Management"],
        "summary": "Admin Dashboard",
        "description": "Get admin dashboard data and metrics",
        "responses": {
          "200": {
            "description": "Admin dashboard data retrieved successfully"
          }
        }
      }
    },
    "/users": {
      "get": {
        "tags": ["Admin Management"],
        "summary": "Get All Users",
        "description": "Retrieve list of all users with filters",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "schema": {"type": "string", "enum": ["active", "inactive"]}
          },
          {
            "name": "department_id",
            "in": "query",
            "schema": {"type": "integer"}
          },
          {
            "name": "team_id",
            "in": "query",
            "schema": {"type": "integer"}
          }
        ],
        "responses": {
          "200": {
            "description": "List of users retrieved successfully"
          }
        }
      },
      "post": {
        "tags": ["Admin Management"],
        "summary": "Create New User",
        "description": "Create a new employee user (Admin only)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["name", "email", "password"],
                "properties": {
                  "name": {"type": "string", "example": "Jane Smith"},
                  "email": {"type": "string", "format": "email", "example": "jane@company.com"},
                  "password": {"type": "string", "format": "password", "example": "password123"},
                  "department_id": {"type": "integer", "example": 1},
                  "team_id": {"type": "integer", "example": 1},
                  "role": {"type": "string", "example": "employee"}
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "User created successfully"
          }
        }
      }
    },
    "/users/{id}": {
      "get": {
        "tags": ["Admin Management"],
        "summary": "Get User Details",
        "description": "Get specific user details by ID",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {"type": "integer"}
          }
        ],
        "responses": {
          "200": {
            "description": "User details retrieved successfully"
          }
        }
      },
      "put": {
        "tags": ["Admin Management"],
        "summary": "Update User",
        "description": "Update user information",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {"type": "integer"}
          }
        ],
        "responses": {
          "200": {
            "description": "User updated successfully"
          }
        }
      },
      "delete": {
        "tags": ["Admin Management"],
        "summary": "Delete User",
        "description": "Delete a user account",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {"type": "integer"}
          }
        ],
        "responses": {
          "200": {
            "description": "User deleted successfully"
          }
        }
      }
    },
    "/departments": {
      "get": {
        "tags": ["Admin Management"],
        "summary": "Get All Departments",
        "description": "Retrieve list of all departments",
        "responses": {
          "200": {
            "description": "List of departments retrieved successfully"
          }
        }
      },
      "post": {
        "tags": ["Admin Management"],
        "summary": "Create Department",
        "description": "Create a new department",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["name"],
                "properties": {
                  "name": {"type": "string", "example": "Engineering"},
                  "description": {"type": "string", "example": "Software development and engineering team"},
                  "manager_id": {"type": "integer", "example": 1}
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Department created successfully"
          }
        }
      }
    },
    "/dashboard": {
      "get": {
        "tags": ["Employee Features"],
        "summary": "User Dashboard",
        "description": "Get employee dashboard with personal stats and recent activities",
        "responses": {
          "200": {
            "description": "User dashboard data retrieved successfully"
          }
        }
      }
    },
    "/attendance/checkin": {
      "post": {
        "tags": ["Employee Features"],
        "summary": "Check In",
        "description": "Employee daily check-in with streak bonus",
        "responses": {
          "200": {
            "description": "Checked in successfully with streak information"
          }
        }
      }
    },
    "/attendance/checkout": {
      "post": {
        "tags": ["Employee Features"],
        "summary": "Check Out",
        "description": "Employee check-out for the day",
        "responses": {
          "200": {
            "description": "Checked out successfully"
          }
        }
      }
    },
    "/attendance/history": {
      "get": {
        "tags": ["Employee Features"],
        "summary": "Get Attendance History",
        "description": "Retrieve employee's attendance history",
        "parameters": [
          {
            "name": "month",
            "in": "query",
            "description": "Filter by month (YYYY-MM format)",
            "schema": {"type": "string", "example": "2026-01"}
          }
        ],
        "responses": {
          "200": {
            "description": "Attendance history retrieved successfully"
          }
        }
      }
    },
    "/attendance/streak": {
      "get": {
        "tags": ["Employee Features"],
        "summary": "Get Attendance Streak",
        "description": "Get current and maximum attendance streak information",
        "responses": {
          "200": {
            "description": "Streak information retrieved successfully"
          }
        }
      }
    },
    "/points/balance": {
      "get": {
        "tags": ["Employee Features"],
        "summary": "Get Points Balance",
        "description": "Get current points balance and summary",
        "responses": {
          "200": {
            "description": "Points balance retrieved successfully"
          }
        }
      }
    },
    "/points/history": {
      "get": {
        "tags": ["Employee Features"],
        "summary": "Get Points History",
        "description": "Retrieve points transaction history",
        "parameters": [
          {
            "name": "source_type",
            "in": "query",
            "description": "Filter by source type",
            "schema": {"type": "string", "enum": ["attendance", "quiz", "challenge", "achievement"]}
          }
        ],
        "responses": {
          "200": {
            "description": "Points history retrieved successfully"
          }
        }
      }
    },
    "/leaderboard": {
      "get": {
        "tags": ["Employee Features"],
        "summary": "Get Leaderboard",
        "description": "Get platform leaderboard rankings",
        "parameters": [
          {
            "name": "period",
            "in": "query",
            "schema": {"type": "string", "enum": ["weekly", "monthly", "all_time"], "default": "all_time"}
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {"type": "integer", "default": 10}
          }
        ],
        "responses": {
          "200": {
            "description": "Leaderboard retrieved successfully"
          }
        }
      }
    },
    "/leaderboard/my-rank": {
      "get": {
        "tags": ["Employee Features"],
        "summary": "Get My Rank",
        "description": "Get current user's rank in leaderboard",
        "responses": {
          "200": {
            "description": "User rank retrieved successfully"
          }
        }
      }
    },
    "/quiz-attempts/start": {
      "post": {
        "tags": ["Employee Features"],
        "summary": "Start Quiz Attempt",
        "description": "Start a new quiz attempt",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["quiz_id"],
                "properties": {
                  "quiz_id": {"type": "integer", "example": 1}
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Quiz attempt started successfully"
          }
        }
      }
    },
    "/quiz-attempts/{id}/submit": {
      "post": {
        "tags": ["Employee Features"],
        "summary": "Submit Quiz Answers",
        "description": "Submit answers for a quiz attempt",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Quiz attempt ID",
            "schema": {"type": "integer"}
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["answers"],
                "properties": {
                  "answers": {
                    "type": "object",
                    "description": "Question ID to answer mapping",
                    "example": {"1": "A", "2": "B", "3": "C"}
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Quiz submitted and scored successfully"
          }
        }
      }
    },
    "/my-challenges": {
      "get": {
        "tags": ["Employee Features"],
        "summary": "Get My Challenges",
        "description": "Get user's joined challenges",
        "responses": {
          "200": {
            "description": "User challenges retrieved successfully"
          }
        }
      }
    },
    "/my-challenges/{challengeId}/join": {
      "post": {
        "tags": ["Employee Features"],
        "summary": "Join Challenge",
        "description": "Join a challenge",
        "parameters": [
          {
            "name": "challengeId",
            "in": "path",
            "required": true,
            "schema": {"type": "integer"}
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "team_id": {
                    "type": "integer",
                    "description": "Required for team challenges",
                    "example": 1
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Challenge joined successfully"
          }
        }
      }
    },
    "/my-challenges/{challengeId}/complete": {
      "post": {
        "tags": ["Employee Features"],
        "summary": "Complete Challenge",
        "description": "Mark challenge as completed and claim points",
        "parameters": [
          {
            "name": "challengeId",
            "in": "path",
            "required": true,
            "schema": {"type": "integer"}
          }
        ],
        "responses": {
          "200": {
            "description": "Challenge completed successfully with points awarded"
          }
        }
      }
    },
    "/my-rewards": {
      "get": {
        "tags": ["Employee Features"],
        "summary": "Get My Reward Redemptions",
        "description": "Get user's reward redemption history",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "schema": {"type": "string", "enum": ["pending", "approved", "delivered", "rejected"]}
          }
        ],
        "responses": {
          "200": {
            "description": "Reward redemptions retrieved successfully"
          }
        }
      }
    },
    "/my-rewards/{rewardId}/redeem": {
      "post": {
        "tags": ["Employee Features"],
        "summary": "Redeem Reward",
        "description": "Redeem a reward using points",
        "parameters": [
          {
            "name": "rewardId",
            "in": "path",
            "required": true,
            "schema": {"type": "integer"}
          }
        ],
        "responses": {
          "200": {
            "description": "Reward redeemed successfully"
          }
        }
      }
    },
    "/my-achievements": {
      "get": {
        "tags": ["Employee Features"],
        "summary": "Get My Achievements",
        "description": "Get user's unlocked achievements",
        "responses": {
          "200": {
            "description": "User achievements retrieved successfully"
          }
        }
      }
    },
    "/available-quizzes": {
      "get": {
        "tags": ["Employee Features"],
        "summary": "Get Available Quizzes",
        "description": "Get all available quizzes for employees",
        "responses": {
          "200": {
            "description": "Available quizzes retrieved successfully"
          }
        }
      }
    },
    "/available-challenges": {
      "get": {
        "tags": ["Employee Features"],
        "summary": "Get Available Challenges",
        "description": "Get all available challenges for employees",
        "responses": {
          "200": {
            "description": "Available challenges retrieved successfully"
          }
        }
      }
    },
    "/rewards-catalog": {
      "get": {
        "tags": ["Employee Features"],
        "summary": "Get Rewards Catalog",
        "description": "Get all available rewards for redemption",
        "responses": {
          "200": {
            "description": "Rewards catalog retrieved successfully"
          }
        }
      }
    },
    "/admin/points/award": {
      "post": {
        "tags": ["Admin Management"],
        "summary": "Award Points to User",
        "description": "Award points to a specific user",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["user_id", "points", "reason"],
                "properties": {
                  "user_id": {"type": "integer", "example": 1},
                  "points": {"type": "integer", "example": 50},
                  "reason": {"type": "string", "example": "Excellent performance this month"}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Points awarded successfully"
          }
        }
      }
    },
    "/admin/points/deduct": {
      "post": {
        "tags": ["Admin Management"],
        "summary": "Deduct Points from User",
        "description": "Deduct points from a specific user",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["user_id", "points", "reason"],
                "properties": {
                  "user_id": {"type": "integer", "example": 1},
                  "points": {"type": "integer", "example": 25},
                  "reason": {"type": "string", "example": "Policy violation"}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Points deducted successfully"
          }
        }
      }
    },
    "/health": {
      "get": {
        "tags": ["Testing"],
        "summary": "Health Check",
        "description": "Check if API is running properly",
        "security": [],
        "responses": {
          "200": {
            "description": "API is running successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {"type": "boolean", "example": true},
                    "message": {"type": "string", "example": "API is running"},
                    "timestamp": {"type": "string", "example": "2026-01-07T08:30:00.000Z"},
                    "version": {"type": "string", "example": "1.0.0"}
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}