{
    "group": "Staff Management",
    "routes": [
        {
            "method": "POST",
            "uri": "/api/staff",
            "title": "Create Staff",
            "description": "Create a new staff member",
            "bodyParams": {
                "name": {
                    "type": "string",
                    "required": true,
                    "description": "Staff member's full name",
                    "example": "John Doe"
                },
                "email": {
                    "type": "string",
                    "format": "email",
                    "required": true,
                    "description": "Staff member's email address",
                    "example": "john@example.com"
                },
                "position": {
                    "type": "string",
                    "required": true,
                    "description": "Staff member's job position",
                    "example": "Developer"
                },
                "department": {
                    "type": "string",
                    "required": true,
                    "description": "Department where staff works",
                    "example": "IT"
                }
            },
            "responses": {
                "201": {
                    "description": "Staff created successfully",
                    "schema": {
                        "$ref": "#/components/schemas/Staff"
                    }
                },
                "422": {
                    "description": "Validation error",
                    "schema": {
                        "type": "object",
                        "properties": {
                            "success": {
                                "type": "boolean",
                                "example": false
                            },
                            "errors": {
                                "type": "object",
                                "additionalProperties": {
                                    "type": "array",
                                    "items": {
                                        "type": "string"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        {
            "method": "GET",
            "uri": "/api/staff/{id?}",
            "title": "Get Staff",
            "description": "Get all staff members or specific one by ID",
            "urlParams": {
                "id": {
                    "type": "integer",
                    "required": false,
                    "description": "Staff ID",
                    "example": 1
                }
            },
            "responses": {
                "200": {
                    "description": "Successful operation",
                    "schema": {
                        "oneOf": [
                            {
                                "type": "array",
                                "items": {
                                    "$ref": "#/components/schemas/Staff"
                                }
                            },
                            {
                                "$ref": "#/components/schemas/Staff"
                            }
                        ]
                    }
                },
                "404": {
                    "description": "Staff not found",
                    "schema": {
                        "type": "object",
                        "properties": {
                            "success": {
                                "type": "boolean",
                                "example": false
                            },
                            "message": {
                                "type": "string",
                                "example": "Staff member not found"
                            }
                        }
                    }
                }
            }
        },
        {
            "method": "PUT",
            "uri": "/api/staff/{id}",
            "title": "Update Staff",
            "description": "Update staff member details",
            "urlParams": {
                "id": {
                    "type": "integer",
                    "required": true,
                    "description": "Staff ID",
                    "example": 1
                }
            },
            "bodyParams": {
                "name": {
                    "type": "string",
                    "required": false,
                    "description": "Updated name",
                    "example": "John Doe Updated"
                },
                "email": {
                    "type": "string",
                    "format": "email",
                    "required": false,
                    "description": "Updated email",
                    "example": "john.updated@example.com"
                },
                "position": {
                    "type": "string",
                    "required": false,
                    "description": "Updated position",
                    "example": "Senior Developer"
                },
                "department": {
                    "type": "string",
                    "required": false,
                    "description": "Updated department",
                    "example": "Engineering"
                }
            },
            "responses": {
                "200": {
                    "description": "Staff updated successfully",
                    "schema": {
                        "$ref": "#/components/schemas/Staff"
                    }
                },
                "404": {
                    "description": "Staff not found",
                    "schema": {
                        "type": "object",
                        "properties": {
                            "success": {
                                "type": "boolean",
                                "example": false
                            },
                            "message": {
                                "type": "string",
                                "example": "Staff member not found"
                            }
                        }
                    }
                },
                "422": {
                    "description": "Validation error",
                    "schema": {
                        "type": "object",
                        "properties": {
                            "success": {
                                "type": "boolean",
                                "example": false
                            },
                            "errors": {
                                "type": "object",
                                "additionalProperties": {
                                    "type": "array",
                                    "items": {
                                        "type": "string"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        {
            "method": "PATCH",
            "uri": "/api/staff/{id}/activate",
            "title": "Activate Staff",
            "description": "Activate a staff member",
            "urlParams": {
                "id": {
                    "type": "integer",
                    "required": true,
                    "description": "Staff ID",
                    "example": 1
                }
            },
            "responses": {
                "200": {
                    "description": "Staff activated",
                    "schema": {
                        "$ref": "#/components/schemas/Staff"
                    }
                },
                "404": {
                    "description": "Staff not found",
                    "schema": {
                        "type": "object",
                        "properties": {
                            "success": {
                                "type": "boolean",
                                "example": false
                            },
                            "message": {
                                "type": "string",
                                "example": "Staff member not found"
                            }
                        }
                    }
                }
            }
        },
        {
            "method": "PATCH",
            "uri": "/api/staff/{id}/deactivate",
            "title": "Deactivate Staff",
            "description": "Deactivate a staff member",
            "urlParams": {
                "id": {
                    "type": "integer",
                    "required": true,
                    "description": "Staff ID",
                    "example": 1
                }
            },
            "responses": {
                "200": {
                    "description": "Staff deactivated",
                    "schema": {
                        "$ref": "#/components/schemas/Staff"
                    }
                },
                "404": {
                    "description": "Staff not found",
                    "schema": {
                        "type": "object",
                        "properties": {
                            "success": {
                                "type": "boolean",
                                "example": false
                            },
                            "message": {
                                "type": "string",
                                "example": "Staff member not found"
                            }
                        }
                    }
                }
            }
        }
    ]
}
