{
  "openapi": "3.0.0",
  "info": {
    "title": "Drill4J API",
    "version": "1.0.0"
  },
  "paths": {
    "/api/group-settings/{groupId}": {
      "get": {
        "summary": "Get group settings",
        "operationId": "getGroupSettingsById",
        "tags": [
          "settings"
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "groupId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "useMaterializedViews",
            "in": "query",
            "description": "Indicates whether to use materialized views for the query.",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Group settings retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "summary": "Save group settings",
        "operationId": "updateGroupSettingsById",
        "tags": [
          "settings"
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "groupId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "useMaterializedViews",
            "in": "query",
            "description": "Indicates whether to use materialized views for the query.",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GroupSettingsPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Group settings saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete group settings",
        "operationId": "deleteGroupSettingsById",
        "tags": [
          "settings"
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "groupId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Group settings deleted successfully"
          }
        }
      }
    },
    "/api/data-ingest/builds": {
      "put": {
        "summary": "Save build data",
        "operationId": "putBuild",
        "tags": [
          "data-ingest"
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BuildPayload"
              }
            },
            "application/protobuf": {
              "schema": {
                "$ref": "#/components/schemas/BuildPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Build saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/data-ingest/instances": {
      "put": {
        "summary": "Save instance data",
        "operationId": "putInstance",
        "tags": [
          "data-ingest"
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InstancePayload"
              }
            },
            "application/protobuf": {
              "schema": {
                "$ref": "#/components/schemas/InstancePayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Instance saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/data-ingest/coverage": {
      "post": {
        "summary": "Save coverage data",
        "operationId": "postCoverage",
        "tags": [
          "data-ingest"
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CoveragePayload"
              }
            },
            "application/protobuf": {
              "schema": {
                "$ref": "#/components/schemas/CoveragePayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Coverage saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/data-ingest/methods": {
      "put": {
        "summary": "Save methods data",
        "operationId": "putMethods",
        "tags": [
          "data-ingest"
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MethodsPayload"
              }
            },
            "application/protobuf": {
              "schema": {
                "$ref": "#/components/schemas/MethodsPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Methods saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/data-ingest/tests-metadata": {
      "post": {
        "summary": "Save test metadata",
        "operationId": "postTestsMetadata",
        "tags": [
          "data-ingest"
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddTestsPayload"
              }
            },
            "application/protobuf": {
              "schema": {
                "$ref": "#/components/schemas/AddTestsPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Test metadata saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/data-ingest/sessions": {
      "put": {
        "summary": "Save test sessions",
        "operationId": "putTestSession",
        "tags": [
          "data-ingest"
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SessionPayload"
              }
            },
            "application/protobuf": {
              "schema": {
                "$ref": "#/components/schemas/SessionPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Test sessions saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/data-ingest/method-ignore-rules": {
      "post": {
        "summary": "Save method ignore rule",
        "operationId": "postMethodIgnoreRules",
        "tags": [
          "data-ingest"
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MethodIgnoreRulePayload"
              }
            },
            "application/protobuf": {
              "schema": {
                "$ref": "#/components/schemas/MethodIgnoreRulePayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Method ignore rule saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageResponse"
                }
              }
            }
          }
        }
      },
      "get": {
        "summary": "Get all method ignore rules",
        "operationId": "getAllMethodIgnoreRules",
        "tags": [
          "data-ingest"
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List of method ignore rules",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListDataResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/data-ingest/method-ignore-rules/{id}": {
      "delete": {
        "summary": "Delete method ignore rule by ID",
        "operationId": "deleteMethodIgnoreRuleById",
        "tags": [
          "data-ingest"
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Method ignore rule deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/metrics/applications": {
      "get": {
        "summary": "Get applications",
        "operationId": "getApplications",
        "tags": [
          "metrics"
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "groupId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of applications",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListDataResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/metrics/builds": {
      "get": {
        "summary": "Get builds",
        "operationId": "getBuilds",
        "tags": [
          "metrics"
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "groupId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "appId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "branch",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "envId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of builds",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListDataResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/metrics/build-diff-report": {
      "get": {
        "summary": "Get build diff report",
        "operationId": "getBuildDiffReport",
        "tags": [
          "metrics"
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "groupId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "appId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "instanceId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "commitSha",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "buildVersion",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "baselineInstanceId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "baselineCommitSha",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "baselineBuildVersion",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "coverageThreshold",
            "in": "query",
            "schema": {
              "type": "number",
              "format": "float",
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Build diff report",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/metrics/recommended-tests": {
      "get": {
        "summary": "Get recommended tests",
        "operationId": "getRecommendedTests",
        "tags": [
          "metrics"
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "groupId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "appId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "testsToSkip",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "testTaskId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "targetInstanceId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "targetCommitSha",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "targetBuildVersion",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "baselineInstanceId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "baselineCommitSha",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "baselineBuildVersion",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "baselineBuildBranches",
            "in": "query",
            "description": "List of baseline build branches to consider.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "coveragePeriodDays",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Recommended tests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/metrics/coverage-treemap": {
      "get": {
        "summary": "Get coverage treemap",
        "operationId": "getCoverageTreemap",
        "tags": [
          "metrics"
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "buildId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "testTag",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "envId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "branch",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "packageNamePattern",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "classNamePattern",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Coverage treemap data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/metrics/changes-coverage-treemap": {
      "get": {
        "summary": "Get changes coverage treemap",
        "operationId": "getChangesCoverageTreemap",
        "tags": [
          "metrics"
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "buildId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "baselineBuildId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "testTag",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "envId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "branch",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "packageNamePattern",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "classNamePattern",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rootId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "includeDeleted",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "includeEqual",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Changes coverage treemap data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/metrics/changes": {
      "get": {
        "summary": "Get method changes between builds",
        "operationId": "getMethodChanges",
        "tags": [
          "metrics"
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "groupId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "appId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "instanceId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "commitSha",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "buildVersion",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "baselineInstanceId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "baselineCommitSha",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "baselineBuildVersion",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of method changes between builds",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListDataResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/metrics/coverage": {
      "get": {
        "summary": "Get coverage by methods for a build",
        "operationId": "getCoverageByMethods",
        "tags": [
          "metrics"
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "buildId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "testTag",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "envId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "branch",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "packageNamePattern",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "classNamePattern",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Method list with coverage data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/metrics/impacted-tests": {
      "get": {
        "summary": "Get impacted tests",
        "operationId": "getImpactedTests",
        "tags": [
          "metrics"
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "groupId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "appId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "instanceId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "commitSha",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "buildVersion",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "baselineInstanceId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "baselineCommitSha",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "baselineBuildVersion",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "testTaskId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "testTag",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "testPath",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of impacted tests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListDataResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/metrics/impacted-methods": {
      "get": {
        "summary": "Get impacted methods",
        "operationId": "getImpactedMethods",
        "tags": [
          "metrics"
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "groupId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "appId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "instanceId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "commitSha",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "buildVersion",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "baselineInstanceId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "baselineCommitSha",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "baselineBuildVersion",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "testTag",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "testTaskId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "testPath",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "testName",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of impacted methods",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListDataResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/metrics/refresh": {
      "post": {
        "summary": "Refresh materialized views",
        "operationId": "refreshMaterializedViews",
        "tags": [
          "metrics"
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Materialized views refresh started",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/sign-in": {
      "post": {
        "summary": "Sign in",
        "operationId": "signIn",
        "tags": [
          "auth"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "User successfully authenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/sign-up": {
      "post": {
        "summary": "Sign up",
        "operationId": "signUp",
        "tags": [
          "auth"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SignUpPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "User successfully registered",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/sign-out": {
      "post": {
        "summary": "Sign out",
        "operationId": "signOut",
        "tags": [
          "auth"
        ],
        "responses": {
          "200": {
            "description": "User successfully signed out",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/user-info": {
      "get": {
        "summary": "Get user info",
        "operationId": "getUserInfo",
        "tags": [
          "auth"
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "User info retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/update-password": {
      "post": {
        "summary": "Update password",
        "operationId": "updatePassword",
        "tags": [
          "auth"
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePasswordPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Password updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/users": {
      "get": {
        "summary": "Get users",
        "operationId": "getAllUsers",
        "tags": [
          "auth"
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List of users",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ListDataResponse"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/users/{userId}": {
      "get": {
        "summary": "Get user by ID",
        "operationId": "getUserById",
        "tags": [
          "auth"
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "User retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "summary": "Edit user",
        "operationId": "editUserById",
        "tags": [
          "auth"
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EditUserPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "User successfully edited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete user",
        "operationId": "deleteUserById",
        "tags": [
          "auth"
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "User successfully deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/users/{userId}/block": {
      "patch": {
        "summary": "Block user",
        "operationId": "blockUserById",
        "tags": [
          "auth"
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "User successfully blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/users/{userId}/unblock": {
      "patch": {
        "summary": "Unblock user",
        "operationId": "unblockUserById",
        "tags": [
          "auth"
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "User successfully unblocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/users/{userId}/reset-password": {
      "patch": {
        "summary": "Reset user password",
        "operationId": "resetUserPasswordById",
        "tags": [
          "auth"
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Password reset successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/user-keys": {
      "get": {
        "summary": "Get user API keys",
        "operationId": "getUserApiKeys",
        "tags": [
          "auth"
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List of user API keys",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ListDataResponse"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Generate user API key",
        "operationId": "generateUserApiKey",
        "tags": [
          "auth"
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateApiKeyPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "API Key successfully generated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/user-keys/{id}": {
      "delete": {
        "summary": "Delete user API key",
        "operationId": "deleteUserApiKeyById",
        "tags": [
          "auth"
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "API Key successfully deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/api-keys": {
      "get": {
        "summary": "Get API keys",
        "operationId": "getApiKeys",
        "tags": [
          "auth"
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List of API keys",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ListDataResponse"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Generate API key",
        "operationId": "generateApiKey",
        "tags": [
          "auth"
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateApiKeyPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "API Key successfully generated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/api-keys/{id}": {
      "delete": {
        "summary": "Delete API key",
        "operationId": "deleteApiKeyById",
        "tags": [
          "auth"
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "API Key successfully deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-KEY"
      }
    },
    "schemas": {
      "DataResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object"
          }
        }
      },
      "ListDataResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "MessageResponse": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          }
        }
      },
      "BuildPayload": {
        "type": "object",
        "properties": {
          "groupId": {
            "type": "string"
          },
          "appId": {
            "type": "string"
          },
          "commitSha": {
            "type": "string",
            "nullable": true
          },
          "buildVersion": {
            "type": "string",
            "nullable": true
          },
          "branch": {
            "type": "string",
            "nullable": true
          },
          "commitDate": {
            "type": "string",
            "nullable": true
          },
          "commitMessage": {
            "type": "string",
            "nullable": true
          },
          "commitAuthor": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "InstancePayload": {
        "type": "object",
        "properties": {
          "groupId": {
            "type": "string"
          },
          "appId": {
            "type": "string"
          },
          "instanceId": {
            "type": "string"
          },
          "commitSha": {
            "type": "string",
            "nullable": true
          },
          "buildVersion": {
            "type": "string",
            "nullable": true
          },
          "envId": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "CoveragePayload": {
        "type": "object",
        "properties": {
          "groupId": {
            "type": "string"
          },
          "appId": {
            "type": "string"
          },
          "instanceId": {
            "type": "string"
          },
          "coverage": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SingleClassCoveragePayload"
            }
          }
        }
      },
      "SingleClassCoveragePayload": {
        "type": "object",
        "properties": {
          "classname": {
            "type": "string"
          },
          "testId": {
            "type": "string"
          },
          "testSessionId": {
            "type": "string"
          },
          "probes": {
            "type": "array",
            "items": {
              "type": "boolean"
            }
          }
        }
      },
      "MethodsPayload": {
        "type": "object",
        "properties": {
          "groupId": {
            "type": "string"
          },
          "appId": {
            "type": "string"
          },
          "commitSha": {
            "type": "string",
            "nullable": true
          },
          "buildVersion": {
            "type": "string",
            "nullable": true
          },
          "instanceId": {
            "type": "string",
            "nullable": true
          },
          "methods": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SingleMethodPayload"
            }
          }
        }
      },
      "SingleMethodPayload": {
        "type": "object",
        "properties": {
          "classname": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "params": {
            "type": "string"
          },
          "returnType": {
            "type": "string"
          },
          "probesCount": {
            "type": "integer"
          },
          "probesStartPos": {
            "type": "integer"
          },
          "bodyChecksum": {
            "type": "string"
          },
          "annotations": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "nullable": true
          },
          "classAnnotations": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "nullable": true
          }
        }
      },
      "AddTestsPayload": {
        "type": "object",
        "properties": {
          "groupId": {
            "type": "string"
          },
          "sessionId": {
            "type": "string"
          },
          "tests": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TestInfo"
            }
          }
        }
      },
      "TestInfo": {
        "type": "object",
        "properties": {
          "testLaunchId": {
            "type": "string"
          },
          "testDefinitionId": {
            "type": "string"
          },
          "result": {
            "$ref": "#/components/schemas/TestResult"
          },
          "duration": {
            "type": "integer"
          },
          "details": {
            "$ref": "#/components/schemas/TestDetails"
          }
        }
      },
      "TestDetails": {
        "type": "object",
        "properties": {
          "runner": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "testName": {
            "type": "string"
          },
          "testParams": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "TestResult": {
        "type": "string",
        "enum": [
          "PASSED",
          "FAILED",
          "ERROR",
          "SKIPPED",
          "SMART_SKIPPED",
          "UNKNOWN"
        ]
      },
      "SessionPayload": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "groupId": {
            "type": "string"
          },
          "testTaskId": {
            "type": "string"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "builds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SingleSessionBuildPayload"
            }
          }
        }
      },
      "SingleSessionBuildPayload": {
        "type": "object",
        "properties": {
          "appId": {
            "type": "string"
          },
          "instanceId": {
            "type": "string"
          },
          "commitSha": {
            "type": "string"
          },
          "buildVersion": {
            "type": "string"
          }
        }
      },
      "MethodIgnoreRulePayload": {
        "type": "object",
        "properties": {
          "groupId": {
            "type": "string"
          },
          "appId": {
            "type": "string"
          },
          "namePattern": {
            "type": "string",
            "nullable": true
          },
          "classnamePattern": {
            "type": "string",
            "nullable": true
          },
          "annotationsPattern": {
            "type": "string",
            "nullable": true
          },
          "classAnnotationsPattern": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "LoginPayload": {
        "type": "object",
        "properties": {
          "username": {
            "type": "string"
          },
          "password": {
            "type": "string"
          }
        }
      },
      "SignUpPayload": {
        "type": "object",
        "properties": {
          "username": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "email": {
            "type": "string"
          }
        }
      },
      "UpdatePasswordPayload": {
        "type": "object",
        "properties": {
          "oldPassword": {
            "type": "string"
          },
          "newPassword": {
            "type": "string"
          }
        }
      },
      "EditUserPayload": {
        "type": "object",
        "properties": {
          "username": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "role": {
            "type": "string"
          }
        }
      },
      "GenerateApiKeyPayload": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          }
        }
      },
      "GroupSettingsPayload": {
        "type": "object",
        "properties": {
          "retentionPeriodDays": {
            "type": "integer",
            "nullable": true
          },
          "metricsPeriodDays": {
            "type": "integer",
            "nullable": true
          }
        }
      }
    }
  }
}