{
    "swagger": "2.0",
    "info": {
        "description": "Security scanner management platform API",
        "title": "servasec API",
        "contact": {
            "name": "API Support",
            "email": "contact@servasec.com"
        },
        "version": "2.4.3"
    },
    "host": "servasec.local",
    "basePath": "/api",
    "paths": {
        "/admin/permissions": {
            "get": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Permissions"
                ],
                "summary": "List permissions",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Filter by subject prefix",
                        "name": "subject",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of policies",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/controllers.PermissionPolicy"
                            }
                        }
                    }
                }
            },
            "post": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Permissions"
                ],
                "summary": "Grant permission",
                "parameters": [
                    {
                        "description": "Subject, resource and action",
                        "name": "input",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "object"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Permission granted",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "400": {
                        "description": "Invalid input",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "409": {
                        "description": "Permission already exists",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            },
            "delete": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Permissions"
                ],
                "summary": "Revoke permission",
                "parameters": [
                    {
                        "description": "Subject, resource and action",
                        "name": "input",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "object"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Permission revoked",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "400": {
                        "description": "Invalid input",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "404": {
                        "description": "Permission not found",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            }
        },
        "/admin/scanner-types/{id}": {
            "put": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Scanner Types"
                ],
                "summary": "Update scanner type",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Scanner type ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "enabled field",
                        "name": "input",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "object"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Updated scanner type",
                        "schema": {
                            "$ref": "#/definitions/models.ScannerType"
                        }
                    },
                    "400": {
                        "description": "Invalid input",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "404": {
                        "description": "Scanner type not found",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            }
        },
        "/api-keys": {
            "get": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "API Keys"
                ],
                "summary": "List API keys for the current user",
                "responses": {
                    "200": {
                        "description": "List of API keys",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/models.UserApiKey"
                            }
                        }
                    }
                }
            },
            "post": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "API Keys"
                ],
                "summary": "Create API key for the current user",
                "parameters": [
                    {
                        "description": "API key name",
                        "name": "input",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/controllers.createApiKeyInput"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created API key with raw key value",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "400": {
                        "description": "Invalid input",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            }
        },
        "/api-keys/{id}": {
            "delete": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "API Keys"
                ],
                "summary": "Revoke an API key",
                "parameters": [
                    {
                        "type": "string",
                        "description": "API key ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "API key revoked",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "404": {
                        "description": "API key not found",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            }
        },
        "/applications": {
            "get": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Applications"
                ],
                "summary": "List applications",
                "responses": {
                    "200": {
                        "description": "List of applications",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/models.Application"
                            }
                        }
                    }
                }
            },
            "post": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Applications"
                ],
                "summary": "Create application",
                "parameters": [
                    {
                        "description": "Application details",
                        "name": "input",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "object"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created application",
                        "schema": {
                            "$ref": "#/definitions/models.Application"
                        }
                    },
                    "400": {
                        "description": "Invalid input",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            }
        },
        "/applications/{id}": {
            "get": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Applications"
                ],
                "summary": "Get application",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Application ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Application with default version",
                        "schema": {
                            "type": "object"
                        }
                    },
                    "404": {
                        "description": "Application not found",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            },
            "put": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Applications"
                ],
                "summary": "Update application",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Application ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Fields to update",
                        "name": "input",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "object"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Updated application",
                        "schema": {
                            "$ref": "#/definitions/models.Application"
                        }
                    },
                    "400": {
                        "description": "Invalid input",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "404": {
                        "description": "Application not found",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            },
            "delete": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Applications"
                ],
                "summary": "Delete application",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Application ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Application deleted",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "404": {
                        "description": "Application not found",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            }
        },
        "/applications/{id}/ingest": {
            "post": {
                "description": "Upload a scan results file. Authenticate via API token header, application ID in path, or application slug in path.",
                "consumes": [
                    "multipart/form-data"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Scans"
                ],
                "summary": "Ingest scan results",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Application ID",
                        "name": "id",
                        "in": "path"
                    },
                    {
                        "type": "string",
                        "description": "Version name",
                        "name": "version",
                        "in": "formData"
                    },
                    {
                        "type": "string",
                        "description": "Branch name",
                        "name": "branch",
                        "in": "formData"
                    },
                    {
                        "type": "string",
                        "description": "Scanner type name",
                        "name": "scannerType",
                        "in": "formData"
                    },
                    {
                        "type": "file",
                        "description": "Scan results file (SARIF, etc.)",
                        "name": "file",
                        "in": "formData",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "API token (alternative to id/slug auth)",
                        "name": "X-Api-Token",
                        "in": "header"
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Scan created with findings count",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "400": {
                        "description": "Bad request",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "404": {
                        "description": "Application not found",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            }
        },
        "/applications/{id}/issue-tracker": {
            "get": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Issue Tracker"
                ],
                "summary": "Get issue tracker configuration",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Application ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Issue tracker config",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "404": {
                        "description": "Application or issue tracker not found",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            },
            "post": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Issue Tracker"
                ],
                "summary": "Upsert issue tracker configuration",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Application ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Issue tracker config (provider, authType, token, severityThreshold, etc.)",
                        "name": "input",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "object"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Updated issue tracker",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "201": {
                        "description": "Created issue tracker",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "400": {
                        "description": "Invalid input",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "404": {
                        "description": "Application not found",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            },
            "delete": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Issue Tracker"
                ],
                "summary": "Delete issue tracker configuration",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Application ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "404": {
                        "description": "Issue tracker not found",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            }
        },
        "/applications/{id}/issue-tracker/issues": {
            "get": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Issue Tracker"
                ],
                "summary": "List issue tracker issues associated with findings",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Application ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of issues",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/models.IssueTrackerIssue"
                            }
                        }
                    },
                    "404": {
                        "description": "Issue tracker not configured",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            }
        },
        "/applications/{id}/issue-tracker/test": {
            "post": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Issue Tracker"
                ],
                "summary": "Test issue tracker connection",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Application ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Connection successful",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "400": {
                        "description": "Connection failed",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "404": {
                        "description": "Application or issue tracker not found",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            }
        },
        "/applications/{id}/permissions": {
            "get": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Permissions"
                ],
                "summary": "List application permissions",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Application ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Application policies",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/controllers.PermissionPolicy"
                            }
                        }
                    }
                }
            },
            "post": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Permissions"
                ],
                "summary": "Grant application permission",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Application ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Subject (user:{id} or team:{id}) and action (read|write)",
                        "name": "input",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "object"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Permission granted",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "400": {
                        "description": "Invalid input",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "404": {
                        "description": "User, team or application not found",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "409": {
                        "description": "Permission already exists",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            },
            "delete": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Permissions"
                ],
                "summary": "Revoke application permission",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Application ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Subject and action",
                        "name": "input",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "object"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Permission revoked",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "400": {
                        "description": "Invalid input",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "404": {
                        "description": "Permission not found",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            }
        },
        "/applications/{id}/regenerate-token": {
            "post": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Applications"
                ],
                "summary": "Regenerate API token",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Application ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "New API token",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "404": {
                        "description": "Application not found",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            }
        },
        "/applications/{id}/versions": {
            "get": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Applications"
                ],
                "summary": "List versions",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Application ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of versions",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/models.ApplicationVersion"
                            }
                        }
                    }
                }
            },
            "post": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Applications"
                ],
                "summary": "Create version",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Application ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Version details",
                        "name": "input",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "object"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created version",
                        "schema": {
                            "$ref": "#/definitions/models.ApplicationVersion"
                        }
                    },
                    "400": {
                        "description": "Invalid input",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "409": {
                        "description": "Version with this name already exists",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            }
        },
        "/applications/{id}/versions/compare": {
            "get": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Applications"
                ],
                "summary": "Compare versions",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Application ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Source version ID or name",
                        "name": "from",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Target version ID or name",
                        "name": "to",
                        "in": "query",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Comparison result",
                        "schema": {
                            "$ref": "#/definitions/controllers.CompareResult"
                        }
                    },
                    "400": {
                        "description": "Missing from/to params",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "404": {
                        "description": "Version not found",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            }
        },
        "/applications/{id}/versions/{versionId}": {
            "get": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Applications"
                ],
                "summary": "Get version",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Application ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Version ID",
                        "name": "versionId",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Version details with scans",
                        "schema": {
                            "$ref": "#/definitions/models.ApplicationVersion"
                        }
                    },
                    "404": {
                        "description": "Version not found",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            },
            "delete": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Applications"
                ],
                "summary": "Delete version",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Application ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Version ID",
                        "name": "versionId",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "404": {
                        "description": "Version not found",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            },
            "patch": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Applications"
                ],
                "summary": "Update version",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Application ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Version ID",
                        "name": "versionId",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Fields to update",
                        "name": "input",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "object"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Updated version",
                        "schema": {
                            "$ref": "#/definitions/models.ApplicationVersion"
                        }
                    },
                    "400": {
                        "description": "Invalid input",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "404": {
                        "description": "Version not found",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            }
        },
        "/applications/{id}/versions/{versionId}/findings": {
            "get": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Applications"
                ],
                "summary": "List version findings",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Application ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Version ID",
                        "name": "versionId",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Filter by severity",
                        "name": "severity",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter by status",
                        "name": "status",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of findings",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/models.Finding"
                            }
                        }
                    },
                    "404": {
                        "description": "Version not found",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            }
        },
        "/applications/{id}/webhooks": {
            "get": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Webhooks"
                ],
                "summary": "List webhooks",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Application ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of webhooks",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/models.Webhook"
                            }
                        }
                    }
                }
            },
            "post": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Webhooks"
                ],
                "summary": "Create webhook",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Application ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Webhook details",
                        "name": "input",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "object"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created webhook",
                        "schema": {
                            "$ref": "#/definitions/models.Webhook"
                        }
                    },
                    "400": {
                        "description": "Invalid input",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            }
        },
        "/applications/{id}/webhooks/{webhookId}": {
            "delete": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Webhooks"
                ],
                "summary": "Delete webhook",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Application ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Webhook ID",
                        "name": "webhookId",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "404": {
                        "description": "Webhook not found",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            }
        },
        "/csrf-token": {
            "get": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Auth"
                ],
                "summary": "Get CSRF token",
                "responses": {
                    "200": {
                        "description": "CSRF token",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "500": {
                        "description": "CSRF token not available",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            }
        },
        "/dashboard/stats": {
            "get": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Dashboard"
                ],
                "summary": "Get dashboard statistics",
                "responses": {
                    "200": {
                        "description": "Dashboard statistics",
                        "schema": {
                            "$ref": "#/definitions/controllers.DashboardStats"
                        }
                    }
                }
            }
        },
        "/findings": {
            "get": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Findings"
                ],
                "summary": "List findings",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Filter by application ID",
                        "name": "applicationId",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter by version ID",
                        "name": "applicationVersionId",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter by severity (critical, high, medium, low, info)",
                        "name": "severity",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter by status (open, confirmed, false_positive, fixed, closed)",
                        "name": "status",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter by scanner type ID",
                        "name": "scannerTypeId",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter by scan ID",
                        "name": "scanId",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter by assignedTo=me",
                        "name": "assignedTo",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Sort field (severity, title, risk_score, created_at)",
                        "name": "sortBy",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Sort order (asc, desc)",
                        "name": "order",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "default": 1,
                        "description": "Page number",
                        "name": "page",
                        "in": "query"
                    },
                    {
                        "maximum": 200,
                        "type": "integer",
                        "default": 50,
                        "description": "Items per page",
                        "name": "perPage",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated findings list",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "500": {
                        "description": "Failed to fetch findings",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            }
        },
        "/findings/{id}": {
            "get": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Findings"
                ],
                "summary": "Get finding",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Finding ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Finding details",
                        "schema": {
                            "$ref": "#/definitions/models.Finding"
                        }
                    },
                    "404": {
                        "description": "Finding not found",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            }
        },
        "/findings/{id}/assign": {
            "patch": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Findings"
                ],
                "summary": "Assign finding",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Finding ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "User ID and optional due date",
                        "name": "input",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "object"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Updated finding with assignment",
                        "schema": {
                            "$ref": "#/definitions/models.Finding"
                        }
                    },
                    "400": {
                        "description": "Invalid input",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "404": {
                        "description": "Finding or user not found",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            }
        },
        "/findings/{id}/comments": {
            "get": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Findings"
                ],
                "summary": "List comments",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Finding ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of comments",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/models.Comment"
                            }
                        }
                    },
                    "404": {
                        "description": "Finding not found",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            },
            "post": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Findings"
                ],
                "summary": "Create comment",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Finding ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Comment body",
                        "name": "input",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "object"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created comment",
                        "schema": {
                            "$ref": "#/definitions/models.Comment"
                        }
                    },
                    "400": {
                        "description": "Comment body is required",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "404": {
                        "description": "Finding not found",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            }
        },
        "/findings/{id}/review": {
            "patch": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Findings"
                ],
                "summary": "Review finding",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Finding ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Optional new status",
                        "name": "input",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "object"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Reviewed finding",
                        "schema": {
                            "$ref": "#/definitions/models.Finding"
                        }
                    },
                    "400": {
                        "description": "Invalid input",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "404": {
                        "description": "Finding not found",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            }
        },
        "/findings/{id}/status": {
            "patch": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Findings"
                ],
                "summary": "Update finding status",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Finding ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "New status",
                        "name": "input",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "object"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Updated finding",
                        "schema": {
                            "$ref": "#/definitions/models.Finding"
                        }
                    },
                    "400": {
                        "description": "Invalid status",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "404": {
                        "description": "Finding not found",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            }
        },
        "/groups": {
            "get": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Groups"
                ],
                "summary": "List groups",
                "responses": {
                    "200": {
                        "description": "List of groups",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/models.Group"
                            }
                        }
                    }
                }
            },
            "post": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Groups"
                ],
                "summary": "Create group",
                "parameters": [
                    {
                        "description": "Group details",
                        "name": "input",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "object"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created group",
                        "schema": {
                            "$ref": "#/definitions/models.Group"
                        }
                    },
                    "400": {
                        "description": "Invalid input",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            }
        },
        "/groups/{id}": {
            "get": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Groups"
                ],
                "summary": "Get group by ID",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Group ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Group details",
                        "schema": {
                            "$ref": "#/definitions/models.Group"
                        }
                    },
                    "404": {
                        "description": "Group not found",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            },
            "put": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Groups"
                ],
                "summary": "Update group",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Group ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Fields to update",
                        "name": "input",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "object"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Updated group",
                        "schema": {
                            "$ref": "#/definitions/models.Group"
                        }
                    },
                    "400": {
                        "description": "Invalid input",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "404": {
                        "description": "Group not found",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            },
            "delete": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Groups"
                ],
                "summary": "Delete group",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Group ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Group deleted",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "404": {
                        "description": "Group not found",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            }
        },
        "/ingest": {
            "post": {
                "description": "Upload a scan results file. Authenticate via API token header, application ID in path, or application slug in path.",
                "consumes": [
                    "multipart/form-data"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Scans"
                ],
                "summary": "Ingest scan results",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Version name",
                        "name": "version",
                        "in": "formData"
                    },
                    {
                        "type": "string",
                        "description": "Branch name",
                        "name": "branch",
                        "in": "formData"
                    },
                    {
                        "type": "string",
                        "description": "Scanner type name",
                        "name": "scannerType",
                        "in": "formData"
                    },
                    {
                        "type": "file",
                        "description": "Scan results file (SARIF, etc.)",
                        "name": "file",
                        "in": "formData",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "API token (alternative to id/slug auth)",
                        "name": "X-Api-Token",
                        "in": "header"
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Scan created with findings count",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "400": {
                        "description": "Bad request",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "404": {
                        "description": "Application not found",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            }
        },
        "/login": {
            "post": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Auth"
                ],
                "summary": "Authenticate user",
                "parameters": [
                    {
                        "description": "Login credentials",
                        "name": "input",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/dto.LoginInput"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Login successful with access_token and refresh_token cookies",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "400": {
                        "description": "Invalid input",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "401": {
                        "description": "Invalid credentials",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            }
        },
        "/logout": {
            "post": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Auth"
                ],
                "summary": "Logout user",
                "responses": {
                    "200": {
                        "description": "Logged out successfully",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            }
        },
        "/me": {
            "get": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Auth"
                ],
                "summary": "Get current user",
                "responses": {
                    "200": {
                        "description": "User profile including features",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            },
            "patch": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Auth"
                ],
                "summary": "Update current user profile",
                "parameters": [
                    {
                        "description": "Fields to update (username, email)",
                        "name": "input",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "object"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Profile updated",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "400": {
                        "description": "Invalid input",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "404": {
                        "description": "User not found",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            }
        },
        "/me/onboarding": {
            "patch": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Auth"
                ],
                "summary": "Mark onboarding as seen",
                "responses": {
                    "200": {
                        "description": "Onboarding marked as seen",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            }
        },
        "/me/password": {
            "put": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Auth"
                ],
                "summary": "Update password",
                "parameters": [
                    {
                        "description": "Current and new password",
                        "name": "input",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "object"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Password updated",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "400": {
                        "description": "Invalid input",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "401": {
                        "description": "Current password is incorrect",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            }
        },
        "/oauth/authorize": {
            "get": {
                "consumes": [
                    "application/x-www-form-urlencoded"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "OAuth"
                ],
                "summary": "OAuth authorization endpoint",
                "parameters": [
                    {
                        "type": "string",
                        "description": "OAuth client ID",
                        "name": "client_id",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Redirect URI",
                        "name": "redirect_uri",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Response type (must be 'code')",
                        "name": "response_type",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "PKCE code challenge",
                        "name": "code_challenge",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "PKCE challenge method (must be 'S256')",
                        "name": "code_challenge_method",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Opaque state value",
                        "name": "state",
                        "in": "query"
                    }
                ],
                "responses": {
                    "302": {
                        "description": "Redirect with authorization code",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "400": {
                        "description": "Missing or invalid parameters",
                        "schema": {
                            "type": "string"
                        }
                    }
                }
            },
            "post": {
                "consumes": [
                    "application/x-www-form-urlencoded"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "OAuth"
                ],
                "summary": "OAuth authorization endpoint",
                "parameters": [
                    {
                        "type": "string",
                        "description": "OAuth client ID",
                        "name": "client_id",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Redirect URI",
                        "name": "redirect_uri",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Response type (must be 'code')",
                        "name": "response_type",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "PKCE code challenge",
                        "name": "code_challenge",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "PKCE challenge method (must be 'S256')",
                        "name": "code_challenge_method",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Opaque state value",
                        "name": "state",
                        "in": "query"
                    }
                ],
                "responses": {
                    "302": {
                        "description": "Redirect with authorization code",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "400": {
                        "description": "Missing or invalid parameters",
                        "schema": {
                            "type": "string"
                        }
                    }
                }
            }
        },
        "/oauth/register": {
            "post": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "OAuth"
                ],
                "summary": "OAuth client registration",
                "parameters": [
                    {
                        "description": "Client registration details",
                        "name": "input",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/oauth.registerRequest"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Registered client with client_id and client_secret",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            }
        },
        "/oauth/token": {
            "post": {
                "consumes": [
                    "application/x-www-form-urlencoded"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "OAuth"
                ],
                "summary": "OAuth token endpoint",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Grant type (authorization_code or refresh_token)",
                        "name": "grant_type",
                        "in": "formData",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "OAuth client ID",
                        "name": "client_id",
                        "in": "formData",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Authorization code (required for authorization_code grant)",
                        "name": "code",
                        "in": "formData"
                    },
                    {
                        "type": "string",
                        "description": "PKCE code verifier (required for authorization_code grant)",
                        "name": "code_verifier",
                        "in": "formData"
                    },
                    {
                        "type": "string",
                        "description": "Redirect URI (optional, must match authorize request)",
                        "name": "redirect_uri",
                        "in": "formData"
                    },
                    {
                        "type": "string",
                        "description": "Refresh token (required for refresh_token grant)",
                        "name": "refresh_token",
                        "in": "formData"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Token response with access_token, refresh_token, expires_in",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            }
        },
        "/policies": {
            "get": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Policies"
                ],
                "summary": "List policies",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Filter by scope type (application, group, global)",
                        "name": "scopeType",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter by scope value",
                        "name": "scopeValue",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter by event type",
                        "name": "eventType",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of policies",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/models.Policy"
                            }
                        }
                    }
                }
            },
            "post": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Policies"
                ],
                "summary": "Create policy",
                "parameters": [
                    {
                        "description": "Policy definition",
                        "name": "input",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "object"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created policy",
                        "schema": {
                            "$ref": "#/definitions/models.Policy"
                        }
                    },
                    "400": {
                        "description": "Invalid input",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "403": {
                        "description": "Access denied",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            }
        },
        "/policies/logs": {
            "get": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Policies"
                ],
                "summary": "List policy logs",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Filter by policy ID",
                        "name": "policyId",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter by finding ID",
                        "name": "findingId",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter by event type",
                        "name": "eventType",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of policy logs",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/models.PolicyLog"
                            }
                        }
                    }
                }
            }
        },
        "/policies/{id}": {
            "get": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Policies"
                ],
                "summary": "Get policy",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Policy ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Policy details",
                        "schema": {
                            "$ref": "#/definitions/models.Policy"
                        }
                    },
                    "404": {
                        "description": "Policy not found",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            },
            "put": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Policies"
                ],
                "summary": "Update policy",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Policy ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Fields to update",
                        "name": "input",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "object"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Updated policy",
                        "schema": {
                            "$ref": "#/definitions/models.Policy"
                        }
                    },
                    "400": {
                        "description": "Invalid input",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "404": {
                        "description": "Policy not found",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            },
            "delete": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Policies"
                ],
                "summary": "Delete policy",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Policy ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "404": {
                        "description": "Policy not found",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            }
        },
        "/policies/{id}/logs": {
            "get": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Policies"
                ],
                "summary": "Get policy logs by policy",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Policy ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of policy logs",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/models.PolicyLog"
                            }
                        }
                    },
                    "404": {
                        "description": "Policy not found",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            }
        },
        "/policies/{id}/toggle": {
            "patch": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Policies"
                ],
                "summary": "Toggle policy",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Policy ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Toggled policy",
                        "schema": {
                            "$ref": "#/definitions/models.Policy"
                        }
                    },
                    "404": {
                        "description": "Policy not found",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            }
        },
        "/refresh": {
            "post": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Auth"
                ],
                "summary": "Refresh access token",
                "responses": {
                    "200": {
                        "description": "Token refreshed, new access_token cookie set",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "401": {
                        "description": "Missing, invalid or blacklisted refresh token",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            }
        },
        "/register": {
            "post": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Auth"
                ],
                "summary": "Register a new user",
                "parameters": [
                    {
                        "description": "Registration details",
                        "name": "input",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/dto.RegisterInput"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "schema": {
                            "type": "object"
                        }
                    },
                    "400": {
                        "description": "Invalid input",
                        "schema": {
                            "type": "object"
                        }
                    },
                    "409": {
                        "description": "Username or email already exists",
                        "schema": {
                            "type": "object"
                        }
                    }
                }
            }
        },
        "/scanner-types": {
            "get": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Scanner Types"
                ],
                "summary": "List scanner types",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Filter by enabled status (true)",
                        "name": "enabled",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of scanner types",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/models.ScannerType"
                            }
                        }
                    }
                }
            }
        },
        "/scans": {
            "get": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Scans"
                ],
                "summary": "List scans",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Filter by application ID",
                        "name": "applicationId",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter by version ID",
                        "name": "applicationVersionId",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of scans",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/models.Scan"
                            }
                        }
                    },
                    "500": {
                        "description": "Failed to fetch scans",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            }
        },
        "/scans/{id}": {
            "get": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Scans"
                ],
                "summary": "Get scan",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Scan ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Scan details",
                        "schema": {
                            "$ref": "#/definitions/models.Scan"
                        }
                    },
                    "404": {
                        "description": "Scan not found",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            }
        },
        "/teams": {
            "get": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Teams"
                ],
                "summary": "List teams",
                "responses": {
                    "200": {
                        "description": "List of teams",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/models.Team"
                            }
                        }
                    }
                }
            },
            "post": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Teams"
                ],
                "summary": "Create team",
                "parameters": [
                    {
                        "description": "Team details",
                        "name": "input",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "object"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created team",
                        "schema": {
                            "$ref": "#/definitions/models.Team"
                        }
                    },
                    "400": {
                        "description": "Invalid input",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            }
        },
        "/teams/{id}": {
            "get": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Teams"
                ],
                "summary": "Get team",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Team ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Team with members",
                        "schema": {
                            "type": "object"
                        }
                    },
                    "404": {
                        "description": "Team not found",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            },
            "put": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Teams"
                ],
                "summary": "Update team",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Team ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Fields to update",
                        "name": "input",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "object"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Updated team",
                        "schema": {
                            "$ref": "#/definitions/models.Team"
                        }
                    },
                    "400": {
                        "description": "Invalid input",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "404": {
                        "description": "Team not found",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            },
            "delete": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Teams"
                ],
                "summary": "Delete team",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Team ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Team deleted",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "404": {
                        "description": "Team not found",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            }
        },
        "/teams/{id}/members": {
            "post": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Teams"
                ],
                "summary": "Add team member",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Team ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "User ID and role",
                        "name": "input",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "object"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Member added",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "400": {
                        "description": "Invalid input",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "404": {
                        "description": "User not found",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "409": {
                        "description": "User is already a team member",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            }
        },
        "/teams/{id}/members/{userId}": {
            "delete": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Teams"
                ],
                "summary": "Remove team member",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Team ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "User ID",
                        "name": "userId",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Member removed",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "400": {
                        "description": "Invalid ID",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "404": {
                        "description": "Team member not found",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            }
        },
        "/users": {
            "get": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Users"
                ],
                "summary": "List all users",
                "responses": {
                    "200": {
                        "description": "List of users",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/models.User"
                            }
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            }
        },
        "/users/search": {
            "get": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Users"
                ],
                "summary": "Search users",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Search query (min 2 characters)",
                        "name": "q",
                        "in": "query",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Matching users (id, username)",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "object"
                            }
                        }
                    },
                    "400": {
                        "description": "Query too short",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            }
        },
        "/users/{id}": {
            "get": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Users"
                ],
                "summary": "Get user by ID",
                "parameters": [
                    {
                        "type": "string",
                        "description": "User ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "User details",
                        "schema": {
                            "$ref": "#/definitions/models.User"
                        }
                    },
                    "404": {
                        "description": "User not found",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            },
            "put": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Users"
                ],
                "summary": "Update user",
                "parameters": [
                    {
                        "type": "string",
                        "description": "User ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Fields to update",
                        "name": "input",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "object"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Updated user info",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "400": {
                        "description": "Invalid input",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "404": {
                        "description": "User not found",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            },
            "delete": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Users"
                ],
                "summary": "Delete user",
                "parameters": [
                    {
                        "type": "string",
                        "description": "User ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "User deleted",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    },
                    "404": {
                        "description": "User not found",
                        "schema": {
                            "$ref": "#/definitions/gin.H"
                        }
                    }
                }
            }
        }
    },
    "definitions": {
        "controllers.CompareResult": {
            "type": "object",
            "properties": {
                "fixed": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/models.Finding"
                    }
                },
                "from": {
                    "$ref": "#/definitions/models.ApplicationVersion"
                },
                "new": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/models.Finding"
                    }
                },
                "stillPresent": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/models.Finding"
                    }
                },
                "to": {
                    "$ref": "#/definitions/models.ApplicationVersion"
                }
            }
        },
        "controllers.DashboardStats": {
            "type": "object",
            "properties": {
                "adminUsers": {
                    "type": "integer"
                },
                "avgRiskScore": {
                    "type": "number"
                },
                "bannedUsers": {
                    "type": "integer"
                },
                "byScanner": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/controllers.ScannerCount"
                    }
                },
                "bySeverity": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/controllers.SeverityCount"
                    }
                },
                "byStatus": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/controllers.StatusCount"
                    }
                },
                "memberUsers": {
                    "type": "integer"
                },
                "myOpenFindings": {
                    "type": "integer"
                },
                "overdueFindings": {
                    "type": "integer"
                },
                "recentScans": {
                    "type": "integer"
                },
                "registeredAt": {
                    "type": "string"
                },
                "riskDistribution": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/pro.RiskBucket"
                    }
                },
                "topFindings": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/controllers.TopFinding"
                    }
                },
                "topRiskyFindings": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/pro.TopRiskyFinding"
                    }
                },
                "totalFindings": {
                    "type": "integer"
                },
                "totalUsers": {
                    "type": "integer"
                }
            }
        },
        "controllers.PermissionPolicy": {
            "type": "object",
            "properties": {
                "action": {
                    "type": "string"
                },
                "id": {
                    "type": "integer"
                },
                "resource": {
                    "type": "string"
                },
                "subject": {
                    "type": "string"
                }
            }
        },
        "controllers.ScannerCount": {
            "type": "object",
            "properties": {
                "count": {
                    "type": "integer"
                },
                "scannerType": {
                    "type": "string"
                }
            }
        },
        "controllers.SeverityCount": {
            "type": "object",
            "properties": {
                "count": {
                    "type": "integer"
                },
                "severity": {
                    "type": "string"
                }
            }
        },
        "controllers.StatusCount": {
            "type": "object",
            "properties": {
                "count": {
                    "type": "integer"
                },
                "status": {
                    "type": "string"
                }
            }
        },
        "controllers.TopFinding": {
            "type": "object",
            "properties": {
                "count": {
                    "type": "integer"
                },
                "ruleId": {
                    "type": "string"
                },
                "title": {
                    "type": "string"
                }
            }
        },
        "controllers.createApiKeyInput": {
            "type": "object",
            "required": [
                "name"
            ],
            "properties": {
                "name": {
                    "type": "string",
                    "maxLength": 100
                }
            }
        },
        "dto.LoginInput": {
            "type": "object",
            "required": [
                "password",
                "username"
            ],
            "properties": {
                "password": {
                    "type": "string"
                },
                "username": {
                    "type": "string"
                }
            }
        },
        "dto.RegisterInput": {
            "type": "object",
            "required": [
                "email",
                "password",
                "username"
            ],
            "properties": {
                "email": {
                    "type": "string",
                    "maxLength": 254
                },
                "password": {
                    "type": "string",
                    "maxLength": 72,
                    "minLength": 8
                },
                "username": {
                    "type": "string",
                    "maxLength": 32
                }
            }
        },
        "gin.H": {
            "type": "object",
            "additionalProperties": {}
        },
        "models.Application": {
            "type": "object",
            "properties": {
                "assetCriticality": {
                    "type": "string"
                },
                "createdAt": {
                    "type": "string"
                },
                "description": {
                    "type": "string"
                },
                "groupId": {
                    "type": "integer"
                },
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                },
                "repositoryUrl": {
                    "type": "string"
                },
                "slug": {
                    "type": "string"
                },
                "updatedAt": {
                    "type": "string"
                },
                "versions": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/models.ApplicationVersion"
                    }
                }
            }
        },
        "models.ApplicationVersion": {
            "type": "object",
            "properties": {
                "application": {
                    "$ref": "#/definitions/models.Application"
                },
                "applicationId": {
                    "type": "integer"
                },
                "branch": {
                    "type": "string"
                },
                "createdAt": {
                    "type": "string"
                },
                "id": {
                    "type": "integer"
                },
                "isDefault": {
                    "type": "boolean"
                },
                "name": {
                    "type": "string"
                },
                "tag": {
                    "type": "string"
                },
                "updatedAt": {
                    "type": "string"
                }
            }
        },
        "models.Comment": {
            "type": "object",
            "properties": {
                "body": {
                    "type": "string"
                },
                "createdAt": {
                    "type": "string"
                },
                "findingId": {
                    "type": "integer"
                },
                "id": {
                    "type": "integer"
                },
                "user": {
                    "$ref": "#/definitions/models.User"
                },
                "userId": {
                    "type": "integer"
                }
            }
        },
        "models.Finding": {
            "type": "object",
            "properties": {
                "applicationVersion": {
                    "$ref": "#/definitions/models.ApplicationVersion"
                },
                "applicationVersionId": {
                    "type": "integer"
                },
                "assignedTo": {
                    "type": "integer"
                },
                "assignedToUser": {
                    "$ref": "#/definitions/models.User"
                },
                "createdAt": {
                    "type": "string"
                },
                "cweId": {
                    "type": "string"
                },
                "dedupeHash": {
                    "type": "string"
                },
                "description": {
                    "type": "string"
                },
                "dueDate": {
                    "type": "string"
                },
                "epssScore": {
                    "type": "number"
                },
                "filePath": {
                    "type": "string"
                },
                "fixedAt": {
                    "type": "string"
                },
                "id": {
                    "type": "integer"
                },
                "lineEnd": {
                    "type": "integer"
                },
                "lineStart": {
                    "type": "integer"
                },
                "remediation": {
                    "type": "string"
                },
                "reviewedBy": {
                    "type": "integer"
                },
                "reviewedByUser": {
                    "$ref": "#/definitions/models.User"
                },
                "riskScore": {
                    "type": "number"
                },
                "ruleId": {
                    "type": "string"
                },
                "scanId": {
                    "type": "integer"
                },
                "scannerType": {
                    "$ref": "#/definitions/models.ScannerType"
                },
                "scannerTypeId": {
                    "type": "integer"
                },
                "severity": {
                    "type": "string"
                },
                "status": {
                    "type": "string"
                },
                "title": {
                    "type": "string"
                },
                "updatedAt": {
                    "type": "string"
                }
            }
        },
        "models.Group": {
            "type": "object",
            "properties": {
                "createdAt": {
                    "type": "string"
                },
                "description": {
                    "type": "string"
                },
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                },
                "path": {
                    "type": "string"
                },
                "updatedAt": {
                    "type": "string"
                }
            }
        },
        "models.IssueTrackerIssue": {
            "type": "object",
            "properties": {
                "createdAt": {
                    "type": "string"
                },
                "externalIssueId": {
                    "type": "string"
                },
                "externalIssueUrl": {
                    "type": "string"
                },
                "findingId": {
                    "type": "integer"
                },
                "id": {
                    "type": "integer"
                },
                "issueTrackerId": {
                    "type": "integer"
                },
                "status": {
                    "type": "string"
                },
                "updatedAt": {
                    "type": "string"
                }
            }
        },
        "models.Policy": {
            "type": "object",
            "properties": {
                "actions": {
                    "type": "string"
                },
                "conditions": {
                    "type": "string"
                },
                "createdAt": {
                    "type": "string"
                },
                "description": {
                    "type": "string"
                },
                "eventTypes": {
                    "type": "string"
                },
                "id": {
                    "type": "integer"
                },
                "isActive": {
                    "type": "boolean"
                },
                "name": {
                    "type": "string"
                },
                "priority": {
                    "type": "integer"
                },
                "scopeType": {
                    "type": "string"
                },
                "scopeValue": {
                    "type": "string"
                },
                "updatedAt": {
                    "type": "string"
                }
            }
        },
        "models.PolicyLog": {
            "type": "object",
            "properties": {
                "actionResult": {
                    "type": "string"
                },
                "actionType": {
                    "type": "string"
                },
                "conditionsMet": {
                    "type": "boolean"
                },
                "createdAt": {
                    "type": "string"
                },
                "detail": {
                    "type": "string"
                },
                "eventType": {
                    "type": "string"
                },
                "findingId": {
                    "type": "integer"
                },
                "id": {
                    "type": "integer"
                },
                "policyId": {
                    "type": "integer"
                }
            }
        },
        "models.Scan": {
            "type": "object",
            "properties": {
                "applicationVersion": {
                    "$ref": "#/definitions/models.ApplicationVersion"
                },
                "applicationVersionId": {
                    "type": "integer"
                },
                "completedAt": {
                    "type": "string"
                },
                "createdAt": {
                    "type": "string"
                },
                "findingsCount": {
                    "type": "integer"
                },
                "id": {
                    "type": "integer"
                },
                "rawResults": {
                    "type": "string"
                },
                "scannerType": {
                    "$ref": "#/definitions/models.ScannerType"
                },
                "scannerTypeId": {
                    "type": "integer"
                },
                "startedAt": {
                    "type": "string"
                },
                "status": {
                    "type": "string"
                },
                "updatedAt": {
                    "type": "string"
                }
            }
        },
        "models.ScannerType": {
            "type": "object",
            "properties": {
                "createdAt": {
                    "type": "string"
                },
                "description": {
                    "type": "string"
                },
                "enabled": {
                    "type": "boolean"
                },
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                },
                "parser": {
                    "type": "string"
                },
                "updatedAt": {
                    "type": "string"
                }
            }
        },
        "models.Team": {
            "type": "object",
            "properties": {
                "createdAt": {
                    "type": "string"
                },
                "description": {
                    "type": "string"
                },
                "id": {
                    "type": "integer"
                },
                "memberCount": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                },
                "updatedAt": {
                    "type": "string"
                }
            }
        },
        "models.User": {
            "type": "object",
            "properties": {
                "avatarUrl": {
                    "type": "string"
                },
                "banned": {
                    "type": "boolean"
                },
                "createdAt": {
                    "type": "string"
                },
                "email": {
                    "type": "string"
                },
                "hasSeenOnboarding": {
                    "type": "boolean"
                },
                "id": {
                    "type": "integer"
                },
                "oauthId": {
                    "type": "string"
                },
                "oauthProvider": {
                    "type": "string"
                },
                "role": {
                    "type": "string"
                },
                "updatedAt": {
                    "type": "string"
                },
                "username": {
                    "type": "string"
                }
            }
        },
        "models.UserApiKey": {
            "type": "object",
            "properties": {
                "createdAt": {
                    "type": "string"
                },
                "expiresAt": {
                    "type": "string"
                },
                "id": {
                    "type": "integer"
                },
                "keyPrefix": {
                    "type": "string"
                },
                "lastUsedAt": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "userId": {
                    "type": "integer"
                }
            }
        },
        "models.Webhook": {
            "type": "object",
            "properties": {
                "applicationId": {
                    "type": "integer"
                },
                "createdAt": {
                    "type": "string"
                },
                "events": {
                    "type": "string"
                },
                "id": {
                    "type": "integer"
                },
                "isActive": {
                    "type": "boolean"
                },
                "secret": {
                    "type": "string"
                },
                "updatedAt": {
                    "type": "string"
                },
                "url": {
                    "type": "string"
                }
            }
        },
        "oauth.registerRequest": {
            "type": "object",
            "properties": {
                "client_name": {
                    "type": "string"
                },
                "redirect_uris": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "token_endpoint_auth_method": {
                    "type": "string"
                }
            }
        },
        "pro.RiskBucket": {
            "type": "object",
            "properties": {
                "count": {
                    "type": "integer"
                },
                "label": {
                    "type": "string"
                }
            }
        },
        "pro.TopRiskyFinding": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "integer"
                },
                "riskScore": {
                    "type": "number"
                },
                "severity": {
                    "type": "string"
                },
                "title": {
                    "type": "string"
                }
            }
        }
    },
    "securityDefinitions": {
        "ApiKeyAuth": {
            "type": "apiKey",
            "name": "access_token",
            "in": "cookie"
        }
    }
}