// Package swagger Code generated by swaggo/swag. DO NOT EDIT
package swagger
import "github.com/swaggo/swag"
const docTemplate = `{
"schemes": {{ marshal .Schemes }},
"swagger": "2.0",
"info": {
"description": "{{escape .Description}}",
"title": "{{.Title}}",
"contact": {},
"version": "{{.Version}}"
},
"host": "{{.Host}}",
"basePath": "{{.BasePath}}",
"paths": {
"/enrichments": {
"get": {
"security": [
{
"APIKeyAuth": []
}
],
"description": "List enrichments with optional filters",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"enrichments"
],
"summary": "List enrichments",
"parameters": [
{
"type": "string",
"description": "Filter by enrichment type",
"name": "enrichment_type",
"in": "query"
},
{
"type": "string",
"description": "Filter by enrichment subtype",
"name": "enrichment_subtype",
"in": "query"
},
{
"type": "integer",
"description": "Page number (default: 1)",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "Results per page (default: 20, max: 100)",
"name": "page_size",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/dto.EnrichmentJSONAPIListResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/middleware.JSONAPIErrorResponse"
}
}
}
}
},
"/enrichments/{id}": {
"get": {
"security": [
{
"APIKeyAuth": []
}
],
"description": "Get an enrichment by ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"enrichments"
],
"summary": "Get enrichment",
"parameters": [
{
"type": "integer",
"description": "Enrichment ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/dto.EnrichmentJSONAPIResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/middleware.JSONAPIErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/middleware.JSONAPIErrorResponse"
}
}
}
},
"delete": {
"security": [
{
"APIKeyAuth": []
}
],
"description": "Delete an enrichment by ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"enrichments"
],
"summary": "Delete enrichment",
"parameters": [
{
"type": "integer",
"description": "Enrichment ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": "No Content"
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/middleware.JSONAPIErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/middleware.JSONAPIErrorResponse"
}
}
}
},
"patch": {
"security": [
{
"APIKeyAuth": []
}
],
"description": "Update an enrichment's content",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"enrichments"
],
"summary": "Update enrichment",
"parameters": [
{
"type": "integer",
"description": "Enrichment ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Update request",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.EnrichmentUpdateRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/dto.EnrichmentJSONAPIResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/middleware.JSONAPIErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/middleware.JSONAPIErrorResponse"
}
}
}
}
},
"/queue": {
"get": {
"security": [
{
"APIKeyAuth": []
}
],
"description": "List tasks in the queue",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"queue"
],
"summary": "List tasks",
"parameters": [
{
"type": "integer",
"description": "Page number (default: 1)",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "Results per page (default: 20, max: 100)",
"name": "page_size",
"in": "query"
},
{
"type": "string",
"description": "Filter by task type",
"name": "task_type",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/dto.TaskListResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/middleware.JSONAPIErrorResponse"
}
}
}
}
},
"/queue/{task_id}": {
"get": {
"security": [
{
"APIKeyAuth": []
}
],
"description": "Get a task by ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"queue"
],
"summary": "Get task",
"parameters": [
{
"type": "integer",
"description": "Task ID",
"name": "task_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/dto.TaskResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/middleware.JSONAPIErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/middleware.JSONAPIErrorResponse"
}
}
}
}
},
"/repositories": {
"get": {
"security": [
{
"APIKeyAuth": []
}
],
"description": "Get all tracked Git repositories",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"repositories"
],
"summary": "List repositories",
"parameters": [
{
"type": "integer",
"description": "Page number (default: 1)",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "Results per page (default: 20, max: 100)",
"name": "page_size",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/dto.RepositoryListResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/middleware.JSONAPIErrorResponse"
}
}
}
},
"post": {
"security": [
{
"APIKeyAuth": []
}
],
"description": "Add a new Git repository to track",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"repositories"
],
"summary": "Add repository",
"parameters": [
{
"description": "Repository request",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.RepositoryCreateRequest"
}
}
],
"responses": {
"200": {
"description": "Repository already exists",
"schema": {
"$ref": "#/definitions/dto.RepositoryResponse"
}
},
"201": {
"description": "Repository created",
"schema": {
"$ref": "#/definitions/dto.RepositoryResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/middleware.JSONAPIErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/middleware.JSONAPIErrorResponse"
}
}
}
}
},
"/repositories/{id}": {
"get": {
"security": [
{
"APIKeyAuth": []
}
],
"description": "Get a repository by ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"repositories"
],
"summary": "Get repository",
"parameters": [
{
"type": "integer",
"description": "Repository ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/dto.RepositoryDetailsResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/middleware.JSONAPIErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/middleware.JSONAPIErrorResponse"
}
}
}
},
"delete": {
"security": [
{
"APIKeyAuth": []
}
],
"description": "Delete a repository by ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"repositories"
],
"summary": "Delete repository",
"parameters": [
{
"type": "integer",
"description": "Repository ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": "No Content"
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/middleware.JSONAPIErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/middleware.JSONAPIErrorResponse"
}
}
}
}
},
"/repositories/{id}/commits": {
"get": {
"security": [
{
"APIKeyAuth": []
}
],
"description": "List commits for a repository",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"repositories"
],
"summary": "List commits",
"parameters": [
{
"type": "integer",
"description": "Repository ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "integer",
"description": "Page number (default: 1)",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "Results per page (default: 20, max: 100)",
"name": "page_size",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/dto.CommitJSONAPIListResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/middleware.JSONAPIErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/middleware.JSONAPIErrorResponse"
}
}
}
}
},
"/repositories/{id}/commits/{commit_sha}": {
"get": {
"security": [
{
"APIKeyAuth": []
}
],
"description": "Get a commit by SHA",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"repositories"
],
"summary": "Get commit",
"parameters": [
{
"type": "integer",
"description": "Repository ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Commit SHA",
"name": "commit_sha",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/dto.CommitJSONAPIResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/middleware.JSONAPIErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/middleware.JSONAPIErrorResponse"
}
}
}
}
},
"/repositories/{id}/commits/{commit_sha}/embeddings": {
"get": {
"security": [
{
"APIKeyAuth": []
}
],
"description": "This endpoint has been removed. Embeddings are an internal detail of snippets and enrichments.",
"produces": [
"application/json"
],
"tags": [
"repositories"
],
"summary": "List commit embeddings (deprecated)",
"deprecated": true,
"parameters": [
{
"type": "integer",
"description": "Repository ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Commit SHA",
"name": "commit_sha",
"in": "path",
"required": true
}
],
"responses": {
"410": {
"description": "Gone",
"schema": {
"$ref": "#/definitions/middleware.JSONAPIErrorResponse"
}
}
}
}
},
"/repositories/{id}/commits/{commit_sha}/enrichments": {
"get": {
"security": [
{
"APIKeyAuth": []
}
],
"description": "List enrichments for a commit",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"repositories"
],
"summary": "List commit enrichments",
"parameters": [
{
"type": "integer",
"description": "Repository ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Commit SHA",
"name": "commit_sha",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Filter by enrichment type",
"name": "enrichment_type",
"in": "query"
},
{
"type": "string",
"description": "Filter by enrichment subtype",
"name": "enrichment_subtype",
"in": "query"
},
{
"type": "integer",
"description": "Page number (default: 1)",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "Results per page (default: 20, max: 100)",
"name": "page_size",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/dto.EnrichmentJSONAPIListResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/middleware.JSONAPIErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/middleware.JSONAPIErrorResponse"
}
}
}
},
"delete": {
"security": [
{
"APIKeyAuth": []
}
],
"description": "Delete all enrichments for a commit",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"repositories"
],
"summary": "Delete commit enrichments",
"parameters": [
{
"type": "integer",
"description": "Repository ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Commit SHA",
"name": "commit_sha",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": "No Content"
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/middleware.JSONAPIErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/middleware.JSONAPIErrorResponse"
}
}
}
}
},
"/repositories/{id}/commits/{commit_sha}/enrichments/{enrichment_id}": {
"get": {
"security": [
{
"APIKeyAuth": []
}
],
"description": "Get an enrichment by ID within commit context",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"repositories"
],
"summary": "Get commit enrichment",
"parameters": [
{
"type": "integer",
"description": "Repository ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Commit SHA",
"name": "commit_sha",
"in": "path",
"required": true
},
{
"type": "integer",
"description": "Enrichment ID",
"name": "enrichment_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/dto.EnrichmentJSONAPIResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/middleware.JSONAPIErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/middleware.JSONAPIErrorResponse"
}
}
}
},
"delete": {
"security": [
{
"APIKeyAuth": []
}
],
"description": "Delete a specific enrichment from a commit",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"repositories"
],
"summary": "Delete commit enrichment",
"parameters": [
{
"type": "integer",
"description": "Repository ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Commit SHA",
"name": "commit_sha",
"in": "path",
"required": true
},
{
"type": "integer",
"description": "Enrichment ID",
"name": "enrichment_id",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": "No Content"
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/middleware.JSONAPIErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/middleware.JSONAPIErrorResponse"
}
}
}
}
},
"/repositories/{id}/commits/{commit_sha}/files": {
"get": {
"security": [
{
"APIKeyAuth": []
}
],
"description": "List files for a commit",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"repositories"
],
"summary": "List commit files",
"parameters": [
{
"type": "integer",
"description": "Repository ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Commit SHA",
"name": "commit_sha",
"in": "path",
"required": true
},
{
"type": "integer",
"description": "Page number (default: 1)",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "Results per page (default: 20, max: 100)",
"name": "page_size",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/dto.FileJSONAPIListResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/middleware.JSONAPIErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/middleware.JSONAPIErrorResponse"
}
}
}
}
},
"/repositories/{id}/commits/{commit_sha}/files/{blob_sha}": {
"get": {
"security": [
{
"APIKeyAuth": []
}
],
"description": "Get a file by blob SHA",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"repositories"
],
"summary": "Get commit file",
"parameters": [
{
"type": "integer",
"description": "Repository ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Commit SHA",
"name": "commit_sha",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Blob SHA",
"name": "blob_sha",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/dto.FileJSONAPIResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/middleware.JSONAPIErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/middleware.JSONAPIErrorResponse"
}
}
}
}
},
"/repositories/{id}/commits/{commit_sha}/rescan": {
"post": {
"security": [
{
"APIKeyAuth": []
}
],
"description": "Trigger a rescan of a specific commit",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"repositories"
],
"summary": "Rescan commit",
"parameters": [
{
"type": "integer",
"description": "Repository ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Commit SHA",
"name": "commit_sha",
"in": "path",
"required": true
}
],
"responses": {
"202": {
"description": "Accepted"
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/middleware.JSONAPIErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/middleware.JSONAPIErrorResponse"
}
}
}
}
},
"/repositories/{id}/commits/{commit_sha}/snippets": {
"get": {
"security": [
{
"APIKeyAuth": []
}
],
"description": "List code snippets for a commit (backed by enrichments)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"repositories"
],
"summary": "List commit snippets",
"parameters": [
{
"type": "integer",
"description": "Repository ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Commit SHA",
"name": "commit_sha",
"in": "path",
"required": true
},
{
"type": "integer",
"description": "Page number (default: 1)",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "Results per page (default: 20, max: 100)",
"name": "page_size",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/dto.SnippetListResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/middleware.JSONAPIErrorResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/middleware.JSONAPIErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/middleware.JSONAPIErrorResponse"
}
}
}
}
},
"/repositories/{id}/enrichments": {
"get": {
"security": [
{
"APIKeyAuth": []
}
],
"description": "List recent enrichments across commits for a repository",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"repositories"
],
"summary": "List repository enrichments",
"parameters": [
{
"type": "integer",
"description": "Repository ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Filter by enrichment type",
"name": "enrichment_type",
"in": "query"
},
{
"type": "integer",
"description": "Max commits to check (default: 100)",
"name": "max_commits_to_check",
"in": "query"
},
{
"type": "integer",
"description": "Page number (default: 1)",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "Results per page (default: 20, max: 100)",
"name": "page_size",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/dto.EnrichmentJSONAPIListResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/middleware.JSONAPIErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/middleware.JSONAPIErrorResponse"
}
}
}
}
},
"/repositories/{id}/status": {
"get": {
"security": [
{
"APIKeyAuth": []
}
],
"description": "Get indexing task status for a repository",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"repositories"
],
"summary": "Get repository status",
"parameters": [
{
"type": "integer",
"description": "Repository ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/dto.TaskStatusListResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/middleware.JSONAPIErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/middleware.JSONAPIErrorResponse"
}
}
}
}
},
"/repositories/{id}/status/summary": {
"get": {
"security": [
{
"APIKeyAuth": []
}
],
"description": "Get aggregated indexing status summary for a repository",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"repositories"
],
"summary": "Get repository status summary",
"parameters": [
{
"type": "integer",
"description": "Repository ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/dto.RepositoryStatusSummaryResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/middleware.JSONAPIErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/middleware.JSONAPIErrorResponse"
}
}
}
}
},
"/repositories/{id}/sync": {
"post": {
"security": [
{
"APIKeyAuth": []
}
],
"description": "Trigger a sync (git fetch + branch scan + commit indexing) for a repository",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"repositories"
],
"summary": "Sync repository",
"parameters": [
{
"type": "integer",
"description": "Repository ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"202": {
"description": "Accepted"
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/middleware.JSONAPIErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/middleware.JSONAPIErrorResponse"
}
}
}
}
},
"/repositories/{id}/tags": {
"get": {
"security": [
{
"APIKeyAuth": []
}
],
"description": "List tags for a repository",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"repositories"
],
"summary": "List tags",
"parameters": [
{
"type": "integer",
"description": "Repository ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "integer",
"description": "Page number (default: 1)",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "Results per page (default: 20, max: 100)",
"name": "page_size",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/dto.TagJSONAPIListResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/middleware.JSONAPIErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/middleware.JSONAPIErrorResponse"
}
}
}
}
},
"/repositories/{id}/tags/{tag_name}": {
"get": {
"security": [
{
"APIKeyAuth": []
}
],
"description": "Get a tag by name",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"repositories"
],
"summary": "Get tag",
"parameters": [
{
"type": "integer",
"description": "Repository ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Tag name",
"name": "tag_name",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/dto.TagJSONAPIResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/middleware.JSONAPIErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/middleware.JSONAPIErrorResponse"
}
}
}
}
},
"/repositories/{id}/tracking-config": {
"get": {
"security": [
{
"APIKeyAuth": []
}
],
"description": "Get current tracking configuration for a repository",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"repositories"
],
"summary": "Get tracking config",
"parameters": [
{
"type": "integer",
"description": "Repository ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/dto.TrackingConfigResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/middleware.JSONAPIErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/middleware.JSONAPIErrorResponse"
}
}
}
},
"put": {
"security": [
{
"APIKeyAuth": []
}
],
"description": "Update tracking configuration for a repository",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"repositories"
],
"summary": "Update tracking config",
"parameters": [
{
"type": "integer",
"description": "Repository ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Tracking config",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.TrackingConfigUpdateRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/dto.TrackingConfigResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/middleware.JSONAPIErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/middleware.JSONAPIErrorResponse"
}
}
}
}
},
"/search": {
"post": {
"security": [
{
"APIKeyAuth": []
}
],
"description": "Hybrid search across code snippets and enrichments",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"search"
],
"summary": "Search code",
"parameters": [
{
"description": "Search request",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.SearchRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/dto.SearchResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/middleware.JSONAPIErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/middleware.JSONAPIErrorResponse"
}
}
}
}
}
},
"definitions": {
"dto.CommitAttributes": {
"type": "object",
"properties": {
"author": {
"type": "string"
},
"commit_sha": {
"type": "string"
},
"date": {
"type": "string"
},
"message": {
"type": "string"
},
"parent_commit_sha": {
"type": "string"
}
}
},
"dto.CommitData": {
"type": "object",
"properties": {
"attributes": {
"$ref": "#/definitions/dto.CommitAttributes"
},
"id": {
"type": "string"
},
"type": {
"type": "string"
}
}
},
"dto.CommitJSONAPIListResponse": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/dto.CommitData"
}
},
"links": {
"$ref": "#/definitions/jsonapi.Links"
},
"meta": {
"$ref": "#/definitions/jsonapi.Meta"
}
}
},
"dto.CommitJSONAPIResponse": {
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/dto.CommitData"
}
}
},
"dto.EnrichmentAttributes": {
"type": "object",
"properties": {
"content": {
"type": "string"
},
"created_at": {
"type": "string"
},
"subtype": {
"type": "string"
},
"type": {
"type": "string"
},
"updated_at": {
"type": "string"
}
}
},
"dto.EnrichmentData": {
"type": "object",
"properties": {
"attributes": {
"$ref": "#/definitions/dto.EnrichmentAttributes"
},
"id": {
"type": "string"
},
"type": {
"type": "string"
}
}
},
"dto.EnrichmentJSONAPIListResponse": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/dto.EnrichmentData"
}
},
"links": {
"$ref": "#/definitions/jsonapi.Links"
},
"meta": {
"$ref": "#/definitions/jsonapi.Meta"
}
}
},
"dto.EnrichmentJSONAPIResponse": {
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/dto.EnrichmentData"
}
}
},
"dto.EnrichmentSchema": {
"type": "object",
"properties": {
"content": {
"type": "string"
},
"type": {
"type": "string"
}
}
},
"dto.EnrichmentUpdateAttributes": {
"type": "object",
"properties": {
"content": {
"type": "string"
}
}
},
"dto.EnrichmentUpdateData": {
"type": "object",
"properties": {
"attributes": {
"$ref": "#/definitions/dto.EnrichmentUpdateAttributes"
},
"type": {
"type": "string"
}
}
},
"dto.EnrichmentUpdateRequest": {
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/dto.EnrichmentUpdateData"
}
}
},
"dto.FileAttributes": {
"type": "object",
"properties": {
"blob_sha": {
"type": "string"
},
"extension": {
"type": "string"
},
"mime_type": {
"type": "string"
},
"path": {
"type": "string"
},
"size": {
"type": "integer"
}
}
},
"dto.FileData": {
"type": "object",
"properties": {
"attributes": {
"$ref": "#/definitions/dto.FileAttributes"
},
"id": {
"type": "string"
},
"type": {
"type": "string"
}
}
},
"dto.FileJSONAPIListResponse": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/dto.FileData"
}
},
"links": {
"$ref": "#/definitions/jsonapi.Links"
},
"meta": {
"$ref": "#/definitions/jsonapi.Meta"
}
}
},
"dto.FileJSONAPIResponse": {
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/dto.FileData"
}
}
},
"dto.GitFileSchema": {
"type": "object",
"properties": {
"blob_sha": {
"type": "string"
},
"mime_type": {
"type": "string"
},
"path": {
"type": "string"
},
"size": {
"type": "integer"
}
}
},
"dto.RepositoryAttributes": {
"type": "object",
"properties": {
"cloned_path": {
"type": "string"
},
"created_at": {
"type": "string"
},
"last_scanned_at": {
"type": "string"
},
"num_branches": {
"type": "integer"
},
"num_commits": {
"type": "integer"
},
"num_tags": {
"type": "integer"
},
"remote_uri": {
"type": "string"
},
"tracking_branch": {
"type": "string"
},
"updated_at": {
"type": "string"
}
}
},
"dto.RepositoryBranchData": {
"type": "object",
"properties": {
"commit_count": {
"type": "integer"
},
"is_default": {
"type": "boolean"
},
"name": {
"type": "string"
}
}
},
"dto.RepositoryCommitData": {
"type": "object",
"properties": {
"author": {
"type": "string"
},
"message": {
"type": "string"
},
"sha": {
"type": "string"
},
"timestamp": {
"type": "string"
}
}
},
"dto.RepositoryCreateAttributes": {
"type": "object",
"properties": {
"remote_uri": {
"type": "string"
}
}
},
"dto.RepositoryCreateData": {
"type": "object",
"properties": {
"attributes": {
"$ref": "#/definitions/dto.RepositoryCreateAttributes"
},
"type": {
"type": "string"
}
}
},
"dto.RepositoryCreateRequest": {
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/dto.RepositoryCreateData"
}
}
},
"dto.RepositoryData": {
"type": "object",
"properties": {
"attributes": {
"$ref": "#/definitions/dto.RepositoryAttributes"
},
"id": {
"type": "string"
},
"type": {
"type": "string"
}
}
},
"dto.RepositoryDetailsResponse": {
"type": "object",
"properties": {
"branches": {
"type": "array",
"items": {
"$ref": "#/definitions/dto.RepositoryBranchData"
}
},
"data": {
"$ref": "#/definitions/dto.RepositoryData"
},
"recent_commits": {
"type": "array",
"items": {
"$ref": "#/definitions/dto.RepositoryCommitData"
}
}
}
},
"dto.RepositoryListResponse": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/dto.RepositoryData"
}
},
"links": {
"$ref": "#/definitions/jsonapi.Links"
},
"meta": {
"$ref": "#/definitions/jsonapi.Meta"
}
}
},
"dto.RepositoryResponse": {
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/dto.RepositoryData"
}
}
},
"dto.RepositoryStatusSummaryAttributes": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"status": {
"type": "string"
},
"updated_at": {
"type": "string"
}
}
},
"dto.RepositoryStatusSummaryData": {
"type": "object",
"properties": {
"attributes": {
"$ref": "#/definitions/dto.RepositoryStatusSummaryAttributes"
},
"id": {
"type": "string"
},
"type": {
"type": "string"
}
}
},
"dto.RepositoryStatusSummaryResponse": {
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/dto.RepositoryStatusSummaryData"
}
}
},
"dto.SearchAttributes": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"filters": {
"$ref": "#/definitions/dto.SearchFilters"
},
"keywords": {
"type": "array",
"items": {
"type": "string"
}
},
"limit": {
"type": "integer"
},
"text": {
"type": "string"
}
}
},
"dto.SearchData": {
"type": "object",
"properties": {
"attributes": {
"$ref": "#/definitions/dto.SearchAttributes"
},
"type": {
"type": "string"
}
}
},
"dto.SearchFilters": {
"type": "object",
"properties": {
"authors": {
"type": "array",
"items": {
"type": "string"
}
},
"commit_sha": {
"type": "array",
"items": {
"type": "string"
}
},
"end_date": {
"type": "string"
},
"enrichment_subtypes": {
"type": "array",
"items": {
"type": "string"
}
},
"enrichment_types": {
"type": "array",
"items": {
"type": "string"
}
},
"file_patterns": {
"type": "array",
"items": {
"type": "string"
}
},
"languages": {
"type": "array",
"items": {
"type": "string"
}
},
"sources": {
"type": "array",
"items": {
"type": "string"
}
},
"start_date": {
"type": "string"
}
}
},
"dto.SearchRequest": {
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/dto.SearchData"
}
}
},
"dto.SearchResponse": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/dto.SnippetData"
}
}
}
},
"dto.SnippetAttributes": {
"type": "object",
"properties": {
"content": {
"$ref": "#/definitions/dto.SnippetContentSchema"
},
"created_at": {
"type": "string"
},
"derives_from": {
"type": "array",
"items": {
"$ref": "#/definitions/dto.GitFileSchema"
}
},
"enrichments": {
"type": "array",
"items": {
"$ref": "#/definitions/dto.EnrichmentSchema"
}
},
"original_scores": {
"type": "array",
"items": {
"type": "number"
}
},
"updated_at": {
"type": "string"
}
}
},
"dto.SnippetContentSchema": {
"type": "object",
"properties": {
"language": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"dto.SnippetData": {
"type": "object",
"properties": {
"attributes": {
"$ref": "#/definitions/dto.SnippetAttributes"
},
"id": {
"type": "string"
},
"links": {
"$ref": "#/definitions/dto.SnippetLinks"
},
"type": {
"type": "string"
}
}
},
"dto.SnippetLinks": {
"type": "object",
"properties": {
"commit": {
"type": "string"
},
"file": {
"type": "string"
},
"repository": {
"type": "string"
}
}
},
"dto.SnippetListResponse": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/dto.SnippetData"
}
},
"links": {
"$ref": "#/definitions/jsonapi.Links"
},
"meta": {
"$ref": "#/definitions/jsonapi.Meta"
}
}
},
"dto.TagAttributes": {
"type": "object",
"properties": {
"is_version_tag": {
"type": "boolean"
},
"name": {
"type": "string"
},
"target_commit_sha": {
"type": "string"
}
}
},
"dto.TagData": {
"type": "object",
"properties": {
"attributes": {
"$ref": "#/definitions/dto.TagAttributes"
},
"id": {
"type": "string"
},
"type": {
"type": "string"
}
}
},
"dto.TagJSONAPIListResponse": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/dto.TagData"
}
},
"links": {
"$ref": "#/definitions/jsonapi.Links"
},
"meta": {
"$ref": "#/definitions/jsonapi.Meta"
}
}
},
"dto.TagJSONAPIResponse": {
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/dto.TagData"
}
}
},
"dto.TaskAttributes": {
"type": "object",
"properties": {
"created_at": {
"type": "string"
},
"payload": {},
"priority": {
"type": "integer"
},
"type": {
"type": "string"
},
"updated_at": {
"type": "string"
}
}
},
"dto.TaskData": {
"type": "object",
"properties": {
"attributes": {
"$ref": "#/definitions/dto.TaskAttributes"
},
"id": {
"type": "string"
},
"type": {
"type": "string"
}
}
},
"dto.TaskListResponse": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/dto.TaskData"
}
},
"links": {
"$ref": "#/definitions/jsonapi.Links"
},
"meta": {
"$ref": "#/definitions/jsonapi.Meta"
}
}
},
"dto.TaskResponse": {
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/dto.TaskData"
}
}
},
"dto.TaskStatusAttributes": {
"type": "object",
"properties": {
"created_at": {
"type": "string"
},
"current": {
"type": "integer"
},
"error": {
"type": "string"
},
"message": {
"type": "string"
},
"progress": {
"type": "number"
},
"state": {
"type": "string"
},
"step": {
"type": "string"
},
"total": {
"type": "integer"
},
"updated_at": {
"type": "string"
}
}
},
"dto.TaskStatusData": {
"type": "object",
"properties": {
"attributes": {
"$ref": "#/definitions/dto.TaskStatusAttributes"
},
"id": {
"type": "string"
},
"type": {
"type": "string"
}
}
},
"dto.TaskStatusListResponse": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/dto.TaskStatusData"
}
},
"links": {
"$ref": "#/definitions/jsonapi.Links"
},
"meta": {
"$ref": "#/definitions/jsonapi.Meta"
}
}
},
"dto.TrackingConfigAttributes": {
"type": "object",
"properties": {
"mode": {
"$ref": "#/definitions/dto.TrackingMode"
},
"value": {
"type": "string"
}
}
},
"dto.TrackingConfigData": {
"type": "object",
"properties": {
"attributes": {
"$ref": "#/definitions/dto.TrackingConfigAttributes"
},
"type": {
"type": "string"
}
}
},
"dto.TrackingConfigResponse": {
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/dto.TrackingConfigData"
}
}
},
"dto.TrackingConfigUpdateAttributes": {
"type": "object",
"properties": {
"mode": {
"$ref": "#/definitions/dto.TrackingMode"
},
"value": {
"type": "string"
}
}
},
"dto.TrackingConfigUpdateData": {
"type": "object",
"properties": {
"attributes": {
"$ref": "#/definitions/dto.TrackingConfigUpdateAttributes"
},
"type": {
"type": "string"
}
}
},
"dto.TrackingConfigUpdateRequest": {
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/dto.TrackingConfigUpdateData"
}
}
},
"dto.TrackingMode": {
"type": "string",
"enum": [
"branch",
"tag"
],
"x-enum-varnames": [
"TrackingModeBranch",
"TrackingModeTag"
]
},
"jsonapi.Links": {
"type": "object",
"properties": {
"first": {
"type": "string"
},
"last": {
"type": "string"
},
"next": {
"type": "string"
},
"prev": {
"type": "string"
},
"self": {
"type": "string"
}
}
},
"jsonapi.Meta": {
"type": "object",
"additionalProperties": {}
},
"middleware.JSONAPIError": {
"type": "object",
"properties": {
"detail": {
"type": "string"
},
"id": {
"type": "string"
},
"status": {
"type": "string"
},
"title": {
"type": "string"
}
}
},
"middleware.JSONAPIErrorResponse": {
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"$ref": "#/definitions/middleware.JSONAPIError"
}
}
}
}
},
"securityDefinitions": {
"APIKeyAuth": {
"type": "apiKey",
"name": "X-API-KEY",
"in": "header"
}
}
}`
// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = &swag.Spec{
Version: "1.0",
Host: "localhost:8080",
BasePath: "/api/v1",
Schemes: []string{},
Title: "Kodit API",
Description: "Code understanding platform with hybrid search and LLM-powered enrichments",
InfoInstanceName: "swagger",
SwaggerTemplate: docTemplate,
LeftDelim: "{{",
RightDelim: "}}",
}
func init() {
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
}