{ "components": { "schemas": { "dto.ChunkingConfigAttributes": { "properties": { "chunk_overlap": { "type": "integer" }, "chunk_size": { "type": "integer" }, "min_chunk_size": { "type": "integer" } }, "type": "object" }, "dto.ChunkingConfigData": { "properties": { "attributes": { "$ref": "#/components/schemas/dto.ChunkingConfigAttributes" }, "type": { "type": "string" } }, "type": "object" }, "dto.ChunkingConfigResponse": { "properties": { "data": { "$ref": "#/components/schemas/dto.ChunkingConfigData" } }, "type": "object" }, "dto.ChunkingConfigUpdateData": { "properties": { "attributes": { "$ref": "#/components/schemas/dto.ChunkingConfigAttributes" }, "type": { "type": "string" } }, "type": "object" }, "dto.ChunkingConfigUpdateRequest": { "properties": { "data": { "$ref": "#/components/schemas/dto.ChunkingConfigUpdateData" } }, "type": "object" }, "dto.CommitAttributes": { "properties": { "author": { "type": "string" }, "commit_sha": { "type": "string" }, "date": { "type": "string" }, "message": { "type": "string" }, "parent_commit_sha": { "type": "string" } }, "type": "object" }, "dto.CommitData": { "properties": { "attributes": { "$ref": "#/components/schemas/dto.CommitAttributes" }, "id": { "type": "string" }, "type": { "type": "string" } }, "type": "object" }, "dto.CommitJSONAPIListResponse": { "properties": { "data": { "items": { "$ref": "#/components/schemas/dto.CommitData" }, "type": "array" }, "links": { "$ref": "#/components/schemas/jsonapi.Links" }, "meta": { "$ref": "#/components/schemas/jsonapi.Meta" } }, "type": "object" }, "dto.CommitJSONAPIResponse": { "properties": { "data": { "$ref": "#/components/schemas/dto.CommitData" } }, "type": "object" }, "dto.EnrichmentAttributes": { "properties": { "content": { "type": "string" }, "created_at": { "type": "string" }, "end_line": { "type": "integer" }, "page": { "type": "integer" }, "start_line": { "type": "integer" }, "subtype": { "type": "string" }, "type": { "type": "string" }, "updated_at": { "type": "string" } }, "type": "object" }, "dto.EnrichmentData": { "properties": { "attributes": { "$ref": "#/components/schemas/dto.EnrichmentAttributes" }, "id": { "type": "string" }, "type": { "type": "string" } }, "type": "object" }, "dto.EnrichmentJSONAPIListResponse": { "properties": { "data": { "items": { "$ref": "#/components/schemas/dto.EnrichmentData" }, "type": "array" }, "links": { "$ref": "#/components/schemas/jsonapi.Links" }, "meta": { "$ref": "#/components/schemas/jsonapi.Meta" } }, "type": "object" }, "dto.EnrichmentJSONAPIResponse": { "properties": { "data": { "$ref": "#/components/schemas/dto.EnrichmentData" } }, "type": "object" }, "dto.EnrichmentSchema": { "properties": { "content": { "type": "string" }, "type": { "type": "string" } }, "type": "object" }, "dto.EnrichmentUpdateAttributes": { "properties": { "content": { "type": "string" } }, "type": "object" }, "dto.EnrichmentUpdateData": { "properties": { "attributes": { "$ref": "#/components/schemas/dto.EnrichmentUpdateAttributes" }, "type": { "type": "string" } }, "type": "object" }, "dto.EnrichmentUpdateRequest": { "properties": { "data": { "$ref": "#/components/schemas/dto.EnrichmentUpdateData" } }, "type": "object" }, "dto.FileAttributes": { "properties": { "blob_sha": { "type": "string" }, "extension": { "type": "string" }, "mime_type": { "type": "string" }, "path": { "type": "string" }, "size": { "type": "integer" } }, "type": "object" }, "dto.FileData": { "properties": { "attributes": { "$ref": "#/components/schemas/dto.FileAttributes" }, "id": { "type": "string" }, "type": { "type": "string" } }, "type": "object" }, "dto.FileJSONAPIListResponse": { "properties": { "data": { "items": { "$ref": "#/components/schemas/dto.FileData" }, "type": "array" }, "links": { "$ref": "#/components/schemas/jsonapi.Links" }, "meta": { "$ref": "#/components/schemas/jsonapi.Meta" } }, "type": "object" }, "dto.FileJSONAPIResponse": { "properties": { "data": { "$ref": "#/components/schemas/dto.FileData" } }, "type": "object" }, "dto.GrepFileLinks": { "properties": { "file": { "type": "string" } }, "type": "object" }, "dto.GrepFileSchema": { "properties": { "language": { "type": "string" }, "links": { "$ref": "#/components/schemas/dto.GrepFileLinks" }, "matches": { "items": { "$ref": "#/components/schemas/dto.GrepMatchSchema" }, "type": "array" }, "path": { "type": "string" } }, "type": "object" }, "dto.GrepMatchSchema": { "properties": { "content": { "type": "string" }, "line": { "type": "integer" } }, "type": "object" }, "dto.GrepResponse": { "properties": { "data": { "items": { "$ref": "#/components/schemas/dto.GrepFileSchema" }, "type": "array" } }, "type": "object" }, "dto.LsFileAttributes": { "properties": { "path": { "type": "string" }, "size": { "type": "integer" } }, "type": "object" }, "dto.LsFileData": { "properties": { "attributes": { "$ref": "#/components/schemas/dto.LsFileAttributes" }, "id": { "type": "string" }, "links": { "$ref": "#/components/schemas/dto.LsFileLinks" }, "type": { "type": "string" } }, "type": "object" }, "dto.LsFileLinks": { "properties": { "self": { "type": "string" } }, "type": "object" }, "dto.LsResponse": { "properties": { "data": { "items": { "$ref": "#/components/schemas/dto.LsFileData" }, "type": "array" }, "links": { "$ref": "#/components/schemas/jsonapi.Links" }, "meta": { "$ref": "#/components/schemas/jsonapi.Meta" } }, "type": "object" }, "dto.PipelineAttributes": { "properties": { "created_at": { "type": "string" }, "name": { "type": "string" }, "updated_at": { "type": "string" } }, "type": "object" }, "dto.PipelineConfigAttributes": { "properties": { "pipeline_id": { "type": "integer" } }, "type": "object" }, "dto.PipelineConfigData": { "properties": { "attributes": { "$ref": "#/components/schemas/dto.PipelineConfigAttributes" }, "links": { "$ref": "#/components/schemas/dto.PipelineConfigLinks" }, "type": { "type": "string" } }, "type": "object" }, "dto.PipelineConfigLinks": { "properties": { "pipeline": { "type": "string" } }, "type": "object" }, "dto.PipelineConfigResponse": { "properties": { "data": { "$ref": "#/components/schemas/dto.PipelineConfigData" }, "included": { "items": { "$ref": "#/components/schemas/dto.PipelineData" }, "type": "array" } }, "type": "object" }, "dto.PipelineConfigUpdateData": { "properties": { "attributes": { "$ref": "#/components/schemas/dto.PipelineConfigAttributes" }, "type": { "type": "string" } }, "type": "object" }, "dto.PipelineConfigUpdateRequest": { "properties": { "data": { "$ref": "#/components/schemas/dto.PipelineConfigUpdateData" } }, "type": "object" }, "dto.PipelineCreateAttributes": { "properties": { "name": { "type": "string" }, "steps": { "items": { "$ref": "#/components/schemas/dto.StepInput" }, "type": "array" } }, "type": "object" }, "dto.PipelineCreateData": { "properties": { "attributes": { "$ref": "#/components/schemas/dto.PipelineCreateAttributes" }, "type": { "type": "string" } }, "type": "object" }, "dto.PipelineCreateRequest": { "properties": { "data": { "$ref": "#/components/schemas/dto.PipelineCreateData" } }, "type": "object" }, "dto.PipelineData": { "properties": { "attributes": { "$ref": "#/components/schemas/dto.PipelineAttributes" }, "id": { "type": "integer" }, "links": { "$ref": "#/components/schemas/dto.PipelineLinks" }, "type": { "type": "string" } }, "type": "object" }, "dto.PipelineDetailResponse": { "properties": { "data": { "$ref": "#/components/schemas/dto.PipelineData" }, "included": { "items": { "$ref": "#/components/schemas/dto.StepData" }, "type": "array" } }, "type": "object" }, "dto.PipelineLinks": { "properties": { "self": { "type": "string" } }, "type": "object" }, "dto.PipelineListResponse": { "properties": { "data": { "items": { "$ref": "#/components/schemas/dto.PipelineData" }, "type": "array" }, "links": { "$ref": "#/components/schemas/jsonapi.Links" }, "meta": { "$ref": "#/components/schemas/jsonapi.Meta" } }, "type": "object" }, "dto.PipelineUpdateAttributes": { "properties": { "name": { "type": "string" }, "steps": { "items": { "$ref": "#/components/schemas/dto.StepInput" }, "type": "array" } }, "type": "object" }, "dto.PipelineUpdateData": { "properties": { "attributes": { "$ref": "#/components/schemas/dto.PipelineUpdateAttributes" }, "type": { "type": "string" } }, "type": "object" }, "dto.PipelineUpdateRequest": { "properties": { "data": { "$ref": "#/components/schemas/dto.PipelineUpdateData" } }, "type": "object" }, "dto.RepositoryAttributes": { "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" }, "pipeline_id": { "type": "integer" }, "remote_uri": { "type": "string" }, "tracking_branch": { "type": "string" }, "updated_at": { "type": "string" }, "upstream_url": { "description": "The canonical upstream URL (e.g. github.com/org/repo); falls back to remote_uri when not set", "type": "string" } }, "type": "object" }, "dto.RepositoryBranchData": { "properties": { "commit_count": { "type": "integer" }, "is_default": { "type": "boolean" }, "name": { "type": "string" } }, "type": "object" }, "dto.RepositoryCommitData": { "properties": { "author": { "type": "string" }, "message": { "type": "string" }, "sha": { "type": "string" }, "timestamp": { "type": "string" } }, "type": "object" }, "dto.RepositoryCreateAttributes": { "properties": { "pipeline": { "description": "Optional pipeline name; looked up by name and assigned to the repository (defaults to the system default pipeline)", "type": "string" }, "remote_uri": { "type": "string" }, "upstream_url": { "description": "Optional canonical upstream URL; used for deduplication when multiple clone URLs point to the same repo", "type": "string" } }, "type": "object" }, "dto.RepositoryCreateData": { "properties": { "attributes": { "$ref": "#/components/schemas/dto.RepositoryCreateAttributes" }, "type": { "type": "string" } }, "type": "object" }, "dto.RepositoryCreateRequest": { "properties": { "data": { "$ref": "#/components/schemas/dto.RepositoryCreateData" } }, "type": "object" }, "dto.RepositoryData": { "properties": { "attributes": { "$ref": "#/components/schemas/dto.RepositoryAttributes" }, "id": { "type": "string" }, "links": { "$ref": "#/components/schemas/dto.RepositoryLinks" }, "type": { "type": "string" } }, "type": "object" }, "dto.RepositoryDetailsResponse": { "properties": { "branches": { "items": { "$ref": "#/components/schemas/dto.RepositoryBranchData" }, "type": "array" }, "data": { "$ref": "#/components/schemas/dto.RepositoryData" }, "recent_commits": { "items": { "$ref": "#/components/schemas/dto.RepositoryCommitData" }, "type": "array" } }, "type": "object" }, "dto.RepositoryLinks": { "properties": { "pipeline": { "type": "string" } }, "type": "object" }, "dto.RepositoryListResponse": { "properties": { "data": { "items": { "$ref": "#/components/schemas/dto.RepositoryData" }, "type": "array" }, "links": { "$ref": "#/components/schemas/jsonapi.Links" }, "meta": { "$ref": "#/components/schemas/jsonapi.Meta" } }, "type": "object" }, "dto.RepositoryResponse": { "properties": { "data": { "$ref": "#/components/schemas/dto.RepositoryData" } }, "type": "object" }, "dto.RepositoryStatusSummaryAttributes": { "properties": { "message": { "type": "string" }, "status": { "type": "string" }, "updated_at": { "type": "string" } }, "type": "object" }, "dto.RepositoryStatusSummaryData": { "properties": { "attributes": { "$ref": "#/components/schemas/dto.RepositoryStatusSummaryAttributes" }, "id": { "type": "string" }, "type": { "type": "string" } }, "type": "object" }, "dto.RepositoryStatusSummaryResponse": { "properties": { "data": { "$ref": "#/components/schemas/dto.RepositoryStatusSummaryData" } }, "type": "object" }, "dto.SearchAttributes": { "properties": { "code": { "type": "string" }, "filters": { "$ref": "#/components/schemas/dto.SearchFilters" }, "keywords": { "items": { "type": "string" }, "type": "array" }, "limit": { "type": "integer" }, "text": { "type": "string" } }, "type": "object" }, "dto.SearchData": { "properties": { "attributes": { "$ref": "#/components/schemas/dto.SearchAttributes" }, "type": { "type": "string" } }, "type": "object" }, "dto.SearchFilters": { "properties": { "authors": { "items": { "type": "string" }, "type": "array" }, "commit_sha": { "items": { "type": "string" }, "type": "array" }, "end_date": { "type": "string" }, "enrichment_subtypes": { "items": { "type": "string" }, "type": "array" }, "enrichment_types": { "items": { "type": "string" }, "type": "array" }, "file_patterns": { "items": { "type": "string" }, "type": "array" }, "languages": { "items": { "type": "string" }, "type": "array" }, "sources": { "items": { "type": "string" }, "type": "array" }, "start_date": { "type": "string" } }, "type": "object" }, "dto.SearchRequest": { "properties": { "data": { "$ref": "#/components/schemas/dto.SearchData" } }, "type": "object" }, "dto.SearchResponse": { "properties": { "data": { "items": { "$ref": "#/components/schemas/dto.SnippetData" }, "type": "array" } }, "type": "object" }, "dto.SnippetAttributes": { "properties": { "content": { "$ref": "#/components/schemas/dto.SnippetContentSchema" }, "created_at": { "type": "string" }, "enrichments": { "items": { "$ref": "#/components/schemas/dto.EnrichmentSchema" }, "type": "array" }, "original_scores": { "items": { "type": "number" }, "type": "array" }, "updated_at": { "type": "string" } }, "type": "object" }, "dto.SnippetContentSchema": { "properties": { "end_line": { "type": "integer" }, "language": { "type": "string" }, "page": { "type": "integer" }, "start_line": { "type": "integer" }, "value": { "type": "string" } }, "type": "object" }, "dto.SnippetData": { "properties": { "attributes": { "$ref": "#/components/schemas/dto.SnippetAttributes" }, "id": { "type": "string" }, "links": { "$ref": "#/components/schemas/dto.SnippetLinks" }, "type": { "type": "string" } }, "type": "object" }, "dto.SnippetLinks": { "properties": { "commit": { "type": "string" }, "file": { "type": "string" }, "repository": { "type": "string" } }, "type": "object" }, "dto.SnippetListResponse": { "properties": { "data": { "items": { "$ref": "#/components/schemas/dto.SnippetData" }, "type": "array" }, "links": { "$ref": "#/components/schemas/jsonapi.Links" }, "meta": { "$ref": "#/components/schemas/jsonapi.Meta" } }, "type": "object" }, "dto.StepAttributes": { "properties": { "depends_on": { "items": { "type": "integer" }, "type": "array" }, "join_type": { "type": "string" }, "kind": { "type": "string" }, "name": { "type": "string" } }, "type": "object" }, "dto.StepData": { "properties": { "attributes": { "$ref": "#/components/schemas/dto.StepAttributes" }, "id": { "type": "integer" }, "links": { "$ref": "#/components/schemas/dto.StepLinks" }, "type": { "type": "string" } }, "type": "object" }, "dto.StepInput": { "properties": { "depends_on": { "items": { "type": "string" }, "type": "array" }, "join_type": { "type": "string" }, "kind": { "type": "string" }, "name": { "type": "string" } }, "type": "object" }, "dto.StepLinks": { "properties": { "self": { "type": "string" } }, "type": "object" }, "dto.StepListResponse": { "properties": { "data": { "items": { "$ref": "#/components/schemas/dto.StepData" }, "type": "array" }, "links": { "$ref": "#/components/schemas/jsonapi.Links" }, "meta": { "$ref": "#/components/schemas/jsonapi.Meta" } }, "type": "object" }, "dto.StepResponse": { "properties": { "data": { "$ref": "#/components/schemas/dto.StepData" } }, "type": "object" }, "dto.TagAttributes": { "properties": { "is_version_tag": { "type": "boolean" }, "name": { "type": "string" }, "target_commit_sha": { "type": "string" } }, "type": "object" }, "dto.TagData": { "properties": { "attributes": { "$ref": "#/components/schemas/dto.TagAttributes" }, "id": { "type": "string" }, "type": { "type": "string" } }, "type": "object" }, "dto.TagJSONAPIListResponse": { "properties": { "data": { "items": { "$ref": "#/components/schemas/dto.TagData" }, "type": "array" }, "links": { "$ref": "#/components/schemas/jsonapi.Links" }, "meta": { "$ref": "#/components/schemas/jsonapi.Meta" } }, "type": "object" }, "dto.TagJSONAPIResponse": { "properties": { "data": { "$ref": "#/components/schemas/dto.TagData" } }, "type": "object" }, "dto.TaskAttributes": { "properties": { "created_at": { "type": "string" }, "payload": {}, "priority": { "type": "integer" }, "type": { "type": "string" }, "updated_at": { "type": "string" } }, "type": "object" }, "dto.TaskData": { "properties": { "attributes": { "$ref": "#/components/schemas/dto.TaskAttributes" }, "id": { "type": "string" }, "type": { "type": "string" } }, "type": "object" }, "dto.TaskListResponse": { "properties": { "data": { "items": { "$ref": "#/components/schemas/dto.TaskData" }, "type": "array" }, "links": { "$ref": "#/components/schemas/jsonapi.Links" }, "meta": { "$ref": "#/components/schemas/jsonapi.Meta" } }, "type": "object" }, "dto.TaskResponse": { "properties": { "data": { "$ref": "#/components/schemas/dto.TaskData" } }, "type": "object" }, "dto.TaskStatusAttributes": { "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" } }, "type": "object" }, "dto.TaskStatusData": { "properties": { "attributes": { "$ref": "#/components/schemas/dto.TaskStatusAttributes" }, "id": { "type": "string" }, "type": { "type": "string" } }, "type": "object" }, "dto.TaskStatusListResponse": { "properties": { "data": { "items": { "$ref": "#/components/schemas/dto.TaskStatusData" }, "type": "array" }, "links": { "$ref": "#/components/schemas/jsonapi.Links" }, "meta": { "$ref": "#/components/schemas/jsonapi.Meta" } }, "type": "object" }, "dto.TrackingConfigAttributes": { "properties": { "mode": { "$ref": "#/components/schemas/dto.TrackingMode" }, "value": { "type": "string" } }, "type": "object" }, "dto.TrackingConfigData": { "properties": { "attributes": { "$ref": "#/components/schemas/dto.TrackingConfigAttributes" }, "type": { "type": "string" } }, "type": "object" }, "dto.TrackingConfigResponse": { "properties": { "data": { "$ref": "#/components/schemas/dto.TrackingConfigData" } }, "type": "object" }, "dto.TrackingConfigUpdateAttributes": { "properties": { "mode": { "$ref": "#/components/schemas/dto.TrackingMode" }, "value": { "type": "string" } }, "type": "object" }, "dto.TrackingConfigUpdateData": { "properties": { "attributes": { "$ref": "#/components/schemas/dto.TrackingConfigUpdateAttributes" }, "type": { "type": "string" } }, "type": "object" }, "dto.TrackingConfigUpdateRequest": { "properties": { "data": { "$ref": "#/components/schemas/dto.TrackingConfigUpdateData" } }, "type": "object" }, "dto.TrackingMode": { "enum": [ "branch", "tag" ], "type": "string" }, "dto.WikiTreeNode": { "properties": { "children": { "items": { "$ref": "#/components/schemas/dto.WikiTreeNode" }, "type": "array" }, "path": { "type": "string" }, "slug": { "type": "string" }, "title": { "type": "string" } }, "type": "object" }, "dto.WikiTreeResponse": { "properties": { "data": { "items": { "$ref": "#/components/schemas/dto.WikiTreeNode" }, "type": "array" } }, "type": "object" }, "jsonapi.Links": { "properties": { "first": { "type": "string" }, "last": { "type": "string" }, "next": { "type": "string" }, "prev": { "type": "string" }, "self": { "type": "string" } }, "type": "object" }, "jsonapi.Meta": { "additionalProperties": {}, "type": "object" }, "middleware.JSONAPIError": { "properties": { "detail": { "type": "string" }, "id": { "type": "string" }, "status": { "type": "string" }, "title": { "type": "string" } }, "type": "object" }, "middleware.JSONAPIErrorResponse": { "properties": { "errors": { "items": { "$ref": "#/components/schemas/middleware.JSONAPIError" }, "type": "array" } }, "type": "object" } }, "securitySchemes": { "APIKeyAuth": { "in": "header", "name": "X-API-KEY", "type": "apiKey" } } }, "info": { "contact": {}, "description": "Code understanding platform with hybrid search and LLM-powered enrichments", "title": "Kodit API", "version": "1.0" }, "openapi": "3.0.3", "paths": { "/enrichments": { "get": { "description": "List enrichments with optional filters", "parameters": [ { "description": "Filter by enrichment type", "in": "query", "name": "enrichment_type", "schema": { "type": "string" } }, { "description": "Filter by enrichment subtype", "in": "query", "name": "enrichment_subtype", "schema": { "type": "string" } }, { "description": "Page number (default: 1)", "in": "query", "name": "page", "schema": { "type": "integer" } }, { "description": "Results per page (default: 20, max: 100)", "in": "query", "name": "page_size", "schema": { "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dto.EnrichmentJSONAPIListResponse" } } }, "description": "OK" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Internal Server Error" } }, "security": [ { "APIKeyAuth": [] } ], "summary": "List enrichments", "tags": [ "enrichments" ] } }, "/enrichments/{id}": { "delete": { "description": "Delete an enrichment by ID", "parameters": [ { "description": "Enrichment ID", "in": "path", "name": "id", "required": true, "schema": { "type": "integer" } } ], "responses": { "204": { "description": "No Content" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Not Found" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Internal Server Error" } }, "security": [ { "APIKeyAuth": [] } ], "summary": "Delete enrichment", "tags": [ "enrichments" ] }, "get": { "description": "Get an enrichment by ID", "parameters": [ { "description": "Enrichment ID", "in": "path", "name": "id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dto.EnrichmentJSONAPIResponse" } } }, "description": "OK" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Not Found" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Internal Server Error" } }, "security": [ { "APIKeyAuth": [] } ], "summary": "Get enrichment", "tags": [ "enrichments" ] }, "patch": { "description": "Update an enrichment's content", "parameters": [ { "description": "Enrichment ID", "in": "path", "name": "id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dto.EnrichmentUpdateRequest" } } }, "description": "Update request", "required": true, "x-originalParamName": "body" }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dto.EnrichmentJSONAPIResponse" } } }, "description": "OK" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Not Found" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Internal Server Error" } }, "security": [ { "APIKeyAuth": [] } ], "summary": "Update enrichment", "tags": [ "enrichments" ] } }, "/pipelines": { "get": { "description": "List all pipelines with pagination", "parameters": [ { "description": "Page number (default: 1)", "in": "query", "name": "page", "schema": { "type": "integer" } }, { "description": "Results per page (default: 20, max: 100)", "in": "query", "name": "page_size", "schema": { "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dto.PipelineListResponse" } } }, "description": "OK" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Internal Server Error" } }, "security": [ { "APIKeyAuth": [] } ], "summary": "List pipelines", "tags": [ "pipelines" ] }, "post": { "description": "Create a new pipeline with steps", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dto.PipelineCreateRequest" } } }, "description": "Pipeline to create", "required": true, "x-originalParamName": "body" }, "responses": { "201": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dto.PipelineDetailResponse" } } }, "description": "Created" }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Bad Request" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Internal Server Error" } }, "security": [ { "APIKeyAuth": [] } ], "summary": "Create pipeline", "tags": [ "pipelines" ] } }, "/pipelines/{id}": { "delete": { "description": "Delete a pipeline and all its steps", "parameters": [ { "description": "Pipeline ID", "in": "path", "name": "id", "required": true, "schema": { "type": "integer" } } ], "responses": { "204": { "description": "No Content" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Not Found" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Internal Server Error" } }, "security": [ { "APIKeyAuth": [] } ], "summary": "Delete pipeline", "tags": [ "pipelines" ] }, "get": { "description": "Get a pipeline with its steps and dependencies", "parameters": [ { "description": "Pipeline ID", "in": "path", "name": "id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dto.PipelineDetailResponse" } } }, "description": "OK" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Not Found" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Internal Server Error" } }, "security": [ { "APIKeyAuth": [] } ], "summary": "Get pipeline", "tags": [ "pipelines" ] }, "put": { "description": "Replace pipeline name and steps", "parameters": [ { "description": "Pipeline ID", "in": "path", "name": "id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dto.PipelineUpdateRequest" } } }, "description": "Pipeline update", "required": true, "x-originalParamName": "body" }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dto.PipelineDetailResponse" } } }, "description": "OK" }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Bad Request" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Not Found" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Internal Server Error" } }, "security": [ { "APIKeyAuth": [] } ], "summary": "Update pipeline", "tags": [ "pipelines" ] } }, "/queue": { "get": { "description": "List tasks in the queue", "parameters": [ { "description": "Page number (default: 1)", "in": "query", "name": "page", "schema": { "type": "integer" } }, { "description": "Results per page (default: 20, max: 100)", "in": "query", "name": "page_size", "schema": { "type": "integer" } }, { "description": "Filter by task type", "in": "query", "name": "task_type", "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dto.TaskListResponse" } } }, "description": "OK" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Internal Server Error" } }, "security": [ { "APIKeyAuth": [] } ], "summary": "List tasks", "tags": [ "queue" ] } }, "/queue/{task_id}": { "get": { "description": "Get a task by ID", "parameters": [ { "description": "Task ID", "in": "path", "name": "task_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dto.TaskResponse" } } }, "description": "OK" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Not Found" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Internal Server Error" } }, "security": [ { "APIKeyAuth": [] } ], "summary": "Get task", "tags": [ "queue" ] } }, "/repositories": { "get": { "description": "Get all tracked Git repositories", "parameters": [ { "description": "Page number (default: 1)", "in": "query", "name": "page", "schema": { "type": "integer" } }, { "description": "Results per page (default: 20, max: 100)", "in": "query", "name": "page_size", "schema": { "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dto.RepositoryListResponse" } } }, "description": "OK" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Internal Server Error" } }, "security": [ { "APIKeyAuth": [] } ], "summary": "List repositories", "tags": [ "repositories" ] }, "post": { "description": "Add a new Git repository to track", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dto.RepositoryCreateRequest" } } }, "description": "Repository request", "required": true, "x-originalParamName": "body" }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dto.RepositoryResponse" } } }, "description": "Repository already exists" }, "201": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dto.RepositoryResponse" } } }, "description": "Repository created" }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Bad Request" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Internal Server Error" } }, "security": [ { "APIKeyAuth": [] } ], "summary": "Add repository", "tags": [ "repositories" ] } }, "/repositories/{id}": { "delete": { "description": "Delete a repository by ID", "parameters": [ { "description": "Repository ID", "in": "path", "name": "id", "required": true, "schema": { "type": "integer" } } ], "responses": { "204": { "description": "No Content" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Not Found" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Internal Server Error" } }, "security": [ { "APIKeyAuth": [] } ], "summary": "Delete repository", "tags": [ "repositories" ] }, "get": { "description": "Get a repository by ID", "parameters": [ { "description": "Repository ID", "in": "path", "name": "id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dto.RepositoryDetailsResponse" } } }, "description": "OK" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Not Found" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Internal Server Error" } }, "security": [ { "APIKeyAuth": [] } ], "summary": "Get repository", "tags": [ "repositories" ] } }, "/repositories/{id}/blob/{blob_name}/{path}": { "get": { "description": "Returns raw file content from a Git repository at a given blob reference (commit SHA, tag, or branch). Use mode=raster&page=N to get a rasterized JPEG of a document page. Use mode=text&page=N to get extracted text from a document page. Use mode=text without page to get the page count.", "parameters": [ { "description": "Repository ID", "in": "path", "name": "id", "required": true, "schema": { "type": "integer" } }, { "description": "Commit SHA, tag name, or branch name", "in": "path", "name": "blob_name", "required": true, "schema": { "type": "string" } }, { "description": "File path within the repository", "in": "path", "name": "path", "required": true, "schema": { "type": "string" } }, { "description": "Line ranges to extract (e.g. L17-L26,L45,L55-L90)", "in": "query", "name": "lines", "schema": { "type": "string" } }, { "description": "Prefix each line with its 1-based line number", "in": "query", "name": "line_numbers", "schema": { "type": "boolean" } }, { "description": "Output mode: 'raster' returns a JPEG image of the page, 'text' returns extracted text", "in": "query", "name": "mode", "schema": { "type": "string" } }, { "description": "1-based page number (required when mode=raster, optional for mode=text)", "in": "query", "name": "page", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "OK" }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } }, "application/octet-stream": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } }, "image/jpeg": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } }, "text/plain": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Bad Request" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } }, "application/octet-stream": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } }, "image/jpeg": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } }, "text/plain": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Not Found" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } }, "application/octet-stream": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } }, "image/jpeg": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } }, "text/plain": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Internal Server Error" } }, "summary": "Get raw file content", "tags": [ "repositories" ] } }, "/repositories/{id}/commits": { "get": { "description": "List commits for a repository", "parameters": [ { "description": "Repository ID", "in": "path", "name": "id", "required": true, "schema": { "type": "integer" } }, { "description": "Page number (default: 1)", "in": "query", "name": "page", "schema": { "type": "integer" } }, { "description": "Results per page (default: 20, max: 100)", "in": "query", "name": "page_size", "schema": { "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dto.CommitJSONAPIListResponse" } } }, "description": "OK" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Not Found" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Internal Server Error" } }, "security": [ { "APIKeyAuth": [] } ], "summary": "List commits", "tags": [ "repositories" ] } }, "/repositories/{id}/commits/{commit_sha}": { "get": { "description": "Get a commit by SHA", "parameters": [ { "description": "Repository ID", "in": "path", "name": "id", "required": true, "schema": { "type": "integer" } }, { "description": "Commit SHA", "in": "path", "name": "commit_sha", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dto.CommitJSONAPIResponse" } } }, "description": "OK" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Not Found" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Internal Server Error" } }, "security": [ { "APIKeyAuth": [] } ], "summary": "Get commit", "tags": [ "repositories" ] } }, "/repositories/{id}/commits/{commit_sha}/embeddings": { "get": { "deprecated": true, "description": "This endpoint has been removed. Embeddings are an internal detail of snippets and enrichments.", "parameters": [ { "description": "Repository ID", "in": "path", "name": "id", "required": true, "schema": { "type": "integer" } }, { "description": "Commit SHA", "in": "path", "name": "commit_sha", "required": true, "schema": { "type": "string" } } ], "responses": { "410": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Gone" } }, "security": [ { "APIKeyAuth": [] } ], "summary": "List commit embeddings (deprecated)", "tags": [ "repositories" ] } }, "/repositories/{id}/commits/{commit_sha}/enrichments": { "delete": { "description": "Delete all enrichments for a commit", "parameters": [ { "description": "Repository ID", "in": "path", "name": "id", "required": true, "schema": { "type": "integer" } }, { "description": "Commit SHA", "in": "path", "name": "commit_sha", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "No Content" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Not Found" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Internal Server Error" } }, "security": [ { "APIKeyAuth": [] } ], "summary": "Delete commit enrichments", "tags": [ "repositories" ] }, "get": { "description": "List enrichments for a commit", "parameters": [ { "description": "Repository ID", "in": "path", "name": "id", "required": true, "schema": { "type": "integer" } }, { "description": "Commit SHA", "in": "path", "name": "commit_sha", "required": true, "schema": { "type": "string" } }, { "description": "Filter by enrichment type", "in": "query", "name": "enrichment_type", "schema": { "type": "string" } }, { "description": "Filter by enrichment subtype", "in": "query", "name": "enrichment_subtype", "schema": { "type": "string" } }, { "description": "Page number (default: 1)", "in": "query", "name": "page", "schema": { "type": "integer" } }, { "description": "Results per page (default: 20, max: 100)", "in": "query", "name": "page_size", "schema": { "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dto.EnrichmentJSONAPIListResponse" } } }, "description": "OK" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Not Found" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Internal Server Error" } }, "security": [ { "APIKeyAuth": [] } ], "summary": "List commit enrichments", "tags": [ "repositories" ] } }, "/repositories/{id}/commits/{commit_sha}/enrichments/{enrichment_id}": { "delete": { "description": "Delete a specific enrichment from a commit", "parameters": [ { "description": "Repository ID", "in": "path", "name": "id", "required": true, "schema": { "type": "integer" } }, { "description": "Commit SHA", "in": "path", "name": "commit_sha", "required": true, "schema": { "type": "string" } }, { "description": "Enrichment ID", "in": "path", "name": "enrichment_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "204": { "description": "No Content" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Not Found" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Internal Server Error" } }, "security": [ { "APIKeyAuth": [] } ], "summary": "Delete commit enrichment", "tags": [ "repositories" ] }, "get": { "description": "Get an enrichment by ID within commit context", "parameters": [ { "description": "Repository ID", "in": "path", "name": "id", "required": true, "schema": { "type": "integer" } }, { "description": "Commit SHA", "in": "path", "name": "commit_sha", "required": true, "schema": { "type": "string" } }, { "description": "Enrichment ID", "in": "path", "name": "enrichment_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dto.EnrichmentJSONAPIResponse" } } }, "description": "OK" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Not Found" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Internal Server Error" } }, "security": [ { "APIKeyAuth": [] } ], "summary": "Get commit enrichment", "tags": [ "repositories" ] } }, "/repositories/{id}/commits/{commit_sha}/files": { "get": { "description": "List files for a commit", "parameters": [ { "description": "Repository ID", "in": "path", "name": "id", "required": true, "schema": { "type": "integer" } }, { "description": "Commit SHA", "in": "path", "name": "commit_sha", "required": true, "schema": { "type": "string" } }, { "description": "Page number (default: 1)", "in": "query", "name": "page", "schema": { "type": "integer" } }, { "description": "Results per page (default: 20, max: 100)", "in": "query", "name": "page_size", "schema": { "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dto.FileJSONAPIListResponse" } } }, "description": "OK" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Not Found" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Internal Server Error" } }, "security": [ { "APIKeyAuth": [] } ], "summary": "List commit files", "tags": [ "repositories" ] } }, "/repositories/{id}/commits/{commit_sha}/files/{blob_sha}": { "get": { "description": "Get a file by blob SHA", "parameters": [ { "description": "Repository ID", "in": "path", "name": "id", "required": true, "schema": { "type": "integer" } }, { "description": "Commit SHA", "in": "path", "name": "commit_sha", "required": true, "schema": { "type": "string" } }, { "description": "Blob SHA", "in": "path", "name": "blob_sha", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dto.FileJSONAPIResponse" } } }, "description": "OK" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Not Found" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Internal Server Error" } }, "security": [ { "APIKeyAuth": [] } ], "summary": "Get commit file", "tags": [ "repositories" ] } }, "/repositories/{id}/commits/{commit_sha}/rescan": { "post": { "description": "Trigger a rescan of a specific commit", "parameters": [ { "description": "Repository ID", "in": "path", "name": "id", "required": true, "schema": { "type": "integer" } }, { "description": "Commit SHA", "in": "path", "name": "commit_sha", "required": true, "schema": { "type": "string" } } ], "responses": { "202": { "description": "Accepted" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Not Found" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Internal Server Error" } }, "security": [ { "APIKeyAuth": [] } ], "summary": "Rescan commit", "tags": [ "repositories" ] } }, "/repositories/{id}/commits/{commit_sha}/snippets": { "get": { "description": "List code snippets for a commit (backed by enrichments)", "parameters": [ { "description": "Repository ID", "in": "path", "name": "id", "required": true, "schema": { "type": "integer" } }, { "description": "Commit SHA", "in": "path", "name": "commit_sha", "required": true, "schema": { "type": "string" } }, { "description": "Page number (default: 1)", "in": "query", "name": "page", "schema": { "type": "integer" } }, { "description": "Results per page (default: 20, max: 100)", "in": "query", "name": "page_size", "schema": { "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dto.SnippetListResponse" } } }, "description": "OK" }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Unauthorized" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Not Found" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Internal Server Error" } }, "security": [ { "APIKeyAuth": [] } ], "summary": "List commit snippets", "tags": [ "repositories" ] } }, "/repositories/{id}/config/chunking": { "get": { "description": "Get current chunking configuration for a repository", "parameters": [ { "description": "Repository ID", "in": "path", "name": "id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dto.ChunkingConfigResponse" } } }, "description": "OK" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Not Found" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Internal Server Error" } }, "security": [ { "APIKeyAuth": [] } ], "summary": "Get chunking config", "tags": [ "repositories" ] }, "put": { "description": "Update chunking configuration for a repository", "parameters": [ { "description": "Repository ID", "in": "path", "name": "id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dto.ChunkingConfigUpdateRequest" } } }, "description": "Chunking config", "required": true, "x-originalParamName": "body" }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dto.ChunkingConfigResponse" } } }, "description": "OK" }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Bad Request" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Not Found" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Internal Server Error" } }, "security": [ { "APIKeyAuth": [] } ], "summary": "Update chunking config", "tags": [ "repositories" ] } }, "/repositories/{id}/config/pipeline": { "get": { "description": "Get the pipeline assigned to a repository. Use ?include=pipeline to include the full pipeline resource.", "parameters": [ { "description": "Repository ID", "in": "path", "name": "id", "required": true, "schema": { "type": "integer" } }, { "description": "Comma-separated related resources to include (e.g. pipeline)", "in": "query", "name": "include", "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dto.PipelineConfigResponse" } } }, "description": "OK" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Not Found" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Internal Server Error" } }, "security": [ { "APIKeyAuth": [] } ], "summary": "Get pipeline config", "tags": [ "repositories" ] }, "put": { "description": "Assign a pipeline to a repository", "parameters": [ { "description": "Repository ID", "in": "path", "name": "id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dto.PipelineConfigUpdateRequest" } } }, "description": "Pipeline configuration", "required": true, "x-originalParamName": "body" }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dto.PipelineConfigResponse" } } }, "description": "OK" }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Bad Request" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Not Found" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Internal Server Error" } }, "security": [ { "APIKeyAuth": [] } ], "summary": "Update pipeline config", "tags": [ "repositories" ] } }, "/repositories/{id}/enrichments": { "get": { "description": "List recent enrichments across commits for a repository", "parameters": [ { "description": "Repository ID", "in": "path", "name": "id", "required": true, "schema": { "type": "integer" } }, { "description": "Filter by enrichment type", "in": "query", "name": "enrichment_type", "schema": { "type": "string" } }, { "description": "Max commits to check (default: 100)", "in": "query", "name": "max_commits_to_check", "schema": { "type": "integer" } }, { "description": "Page number (default: 1)", "in": "query", "name": "page", "schema": { "type": "integer" } }, { "description": "Results per page (default: 20, max: 100)", "in": "query", "name": "page_size", "schema": { "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dto.EnrichmentJSONAPIListResponse" } } }, "description": "OK" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Not Found" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Internal Server Error" } }, "security": [ { "APIKeyAuth": [] } ], "summary": "List repository enrichments", "tags": [ "repositories" ] } }, "/repositories/{id}/grep": { "get": { "deprecated": true, "description": "Deprecated: use GET /api/v1/search/grep instead. Searches file contents in a repository using git grep.", "parameters": [ { "description": "Repository ID", "in": "path", "name": "id", "required": true, "schema": { "type": "integer" } }, { "description": "Search pattern", "in": "query", "name": "pattern", "required": true, "schema": { "type": "string" } }, { "description": "Glob pattern to filter files", "in": "query", "name": "glob", "schema": { "type": "string" } }, { "description": "Maximum results (default 50, max 200)", "in": "query", "name": "limit", "schema": { "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dto.GrepResponse" } } }, "description": "OK" }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Bad Request" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Not Found" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Internal Server Error" } }, "security": [ { "APIKeyAuth": [] } ], "summary": "Grep repository (deprecated)", "tags": [ "repositories" ] } }, "/repositories/{id}/status": { "get": { "description": "Get indexing task status for a repository", "parameters": [ { "description": "Repository ID", "in": "path", "name": "id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dto.TaskStatusListResponse" } } }, "description": "OK" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Not Found" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Internal Server Error" } }, "security": [ { "APIKeyAuth": [] } ], "summary": "Get repository status", "tags": [ "repositories" ] } }, "/repositories/{id}/status/summary": { "get": { "description": "Get aggregated indexing status summary for a repository", "parameters": [ { "description": "Repository ID", "in": "path", "name": "id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dto.RepositoryStatusSummaryResponse" } } }, "description": "OK" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Not Found" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Internal Server Error" } }, "security": [ { "APIKeyAuth": [] } ], "summary": "Get repository status summary", "tags": [ "repositories" ] } }, "/repositories/{id}/sync": { "post": { "description": "Trigger a sync (git fetch + branch scan + commit indexing) for a repository", "parameters": [ { "description": "Repository ID", "in": "path", "name": "id", "required": true, "schema": { "type": "integer" } } ], "responses": { "202": { "description": "Accepted" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Not Found" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Internal Server Error" } }, "security": [ { "APIKeyAuth": [] } ], "summary": "Sync repository", "tags": [ "repositories" ] } }, "/repositories/{id}/tags": { "get": { "description": "List tags for a repository", "parameters": [ { "description": "Repository ID", "in": "path", "name": "id", "required": true, "schema": { "type": "integer" } }, { "description": "Page number (default: 1)", "in": "query", "name": "page", "schema": { "type": "integer" } }, { "description": "Results per page (default: 20, max: 100)", "in": "query", "name": "page_size", "schema": { "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dto.TagJSONAPIListResponse" } } }, "description": "OK" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Not Found" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Internal Server Error" } }, "security": [ { "APIKeyAuth": [] } ], "summary": "List tags", "tags": [ "repositories" ] } }, "/repositories/{id}/tags/{tag_name}": { "get": { "description": "Get a tag by name", "parameters": [ { "description": "Repository ID", "in": "path", "name": "id", "required": true, "schema": { "type": "integer" } }, { "description": "Tag name", "in": "path", "name": "tag_name", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dto.TagJSONAPIResponse" } } }, "description": "OK" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Not Found" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Internal Server Error" } }, "security": [ { "APIKeyAuth": [] } ], "summary": "Get tag", "tags": [ "repositories" ] } }, "/repositories/{id}/tracking-config": { "get": { "description": "Get current tracking configuration for a repository", "parameters": [ { "description": "Repository ID", "in": "path", "name": "id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dto.TrackingConfigResponse" } } }, "description": "OK" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Not Found" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Internal Server Error" } }, "security": [ { "APIKeyAuth": [] } ], "summary": "Get tracking config", "tags": [ "repositories" ] }, "put": { "description": "Update tracking configuration for a repository", "parameters": [ { "description": "Repository ID", "in": "path", "name": "id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dto.TrackingConfigUpdateRequest" } } }, "description": "Tracking config", "required": true, "x-originalParamName": "body" }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dto.TrackingConfigResponse" } } }, "description": "OK" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Not Found" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Internal Server Error" } }, "security": [ { "APIKeyAuth": [] } ], "summary": "Update tracking config", "tags": [ "repositories" ] } }, "/repositories/{id}/wiki": { "get": { "description": "Get the wiki navigation tree (titles and paths, no content)", "parameters": [ { "description": "Repository ID", "in": "path", "name": "id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dto.WikiTreeResponse" } } }, "description": "OK" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Not Found" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Internal Server Error" } }, "security": [ { "APIKeyAuth": [] } ], "summary": "Get wiki tree", "tags": [ "repositories" ] } }, "/repositories/{id}/wiki/rescan": { "post": { "description": "Delete the existing wiki and regenerate it from scratch", "parameters": [ { "description": "Repository ID", "in": "path", "name": "id", "required": true, "schema": { "type": "integer" } } ], "responses": { "202": { "description": "Accepted" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Not Found" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Internal Server Error" } }, "security": [ { "APIKeyAuth": [] } ], "summary": "Rescan wiki", "tags": [ "repositories" ] } }, "/repositories/{id}/wiki/{path}": { "get": { "description": "Get a wiki page by hierarchical path as raw markdown", "parameters": [ { "description": "Repository ID", "in": "path", "name": "id", "required": true, "schema": { "type": "integer" } }, { "description": "Wiki page path (e.g. architecture/database-layer.md)", "in": "path", "name": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "text/markdown": { "schema": { "type": "string" } } }, "description": "OK" }, "404": { "content": { "text/markdown": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Not Found" }, "500": { "content": { "text/markdown": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Internal Server Error" } }, "security": [ { "APIKeyAuth": [] } ], "summary": "Get wiki page", "tags": [ "repositories" ] } }, "/search": { "post": { "description": "Hybrid search across code snippets and enrichments", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dto.SearchRequest" } } }, "description": "Search request", "required": true, "x-originalParamName": "body" }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dto.SearchResponse" } } }, "description": "OK" }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Bad Request" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Internal Server Error" } }, "summary": "Search code", "tags": [ "search" ] } }, "/search/grep": { "get": { "description": "Search file contents in a repository using git grep with regex patterns", "parameters": [ { "description": "Repository ID", "in": "query", "name": "repository_id", "required": true, "schema": { "type": "integer" } }, { "description": "Regex pattern to search for", "in": "query", "name": "pattern", "required": true, "schema": { "type": "string" } }, { "description": "File path filter (e.g. *.go, src/**/*.ts)", "in": "query", "name": "glob", "schema": { "type": "string" } }, { "description": "Maximum number of file results (default 10, max 200)", "in": "query", "name": "limit", "schema": { "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dto.GrepResponse" } } }, "description": "OK" }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Bad Request" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Not Found" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Internal Server Error" } }, "summary": "Search file contents with grep", "tags": [ "search" ] } }, "/search/keyword": { "get": { "description": "Search code snippets using BM25 keyword matching", "parameters": [ { "description": "Search keywords", "in": "query", "name": "keywords", "required": true, "schema": { "type": "string" } }, { "description": "Language filter (e.g. py, go)", "in": "query", "name": "language", "schema": { "type": "string" } }, { "description": "Repository ID filter", "in": "query", "name": "repository_id", "schema": { "type": "integer" } }, { "description": "Maximum results (default 10)", "in": "query", "name": "limit", "schema": { "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dto.SearchResponse" } } }, "description": "OK" }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Bad Request" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Internal Server Error" } }, "summary": "Keyword code search", "tags": [ "search" ] } }, "/search/ls": { "get": { "description": "Returns files from a repository working copy matching a glob pattern, with file:// URIs", "parameters": [ { "description": "Repository ID", "in": "query", "name": "repository_id", "required": true, "schema": { "type": "integer" } }, { "description": "Glob/pathspec pattern (e.g. **/*.go, src/*.py)", "in": "query", "name": "pattern", "required": true, "schema": { "type": "string" } }, { "description": "Page number (default: 1)", "in": "query", "name": "page", "schema": { "type": "integer" } }, { "description": "Results per page (default: 20, max: 100)", "in": "query", "name": "page_size", "schema": { "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dto.LsResponse" } } }, "description": "OK" }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Bad Request" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Not Found" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Internal Server Error" } }, "summary": "List files matching a glob pattern", "tags": [ "search" ] } }, "/search/semantic": { "get": { "description": "Search code snippets using semantic similarity", "parameters": [ { "description": "Natural language search query", "in": "query", "name": "query", "required": true, "schema": { "type": "string" } }, { "description": "Language filter (e.g. py, go)", "in": "query", "name": "language", "schema": { "type": "string" } }, { "description": "Repository ID filter", "in": "query", "name": "repository_id", "schema": { "type": "integer" } }, { "description": "Maximum results (default 10)", "in": "query", "name": "limit", "schema": { "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dto.SearchResponse" } } }, "description": "OK" }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Bad Request" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Internal Server Error" } }, "summary": "Semantic code search", "tags": [ "search" ] } }, "/search/visual": { "get": { "description": "Search document pages (PDFs, etc.) using cross-modal visual similarity", "parameters": [ { "description": "Natural language search query", "in": "query", "name": "query", "required": true, "schema": { "type": "string" } }, { "description": "Repository ID filter", "in": "query", "name": "repository_id", "schema": { "type": "integer" } }, { "description": "Maximum results (default 10)", "in": "query", "name": "limit", "schema": { "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dto.SearchResponse" } } }, "description": "OK" }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Bad Request" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Internal Server Error" } }, "security": [ { "APIKeyAuth": [] } ], "summary": "Visual document search", "tags": [ "search" ] } }, "/steps": { "get": { "description": "List all steps with pagination", "parameters": [ { "description": "Page number (default: 1)", "in": "query", "name": "page", "schema": { "type": "integer" } }, { "description": "Results per page (default: 20, max: 100)", "in": "query", "name": "page_size", "schema": { "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dto.StepListResponse" } } }, "description": "OK" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Internal Server Error" } }, "security": [ { "APIKeyAuth": [] } ], "summary": "List steps", "tags": [ "steps" ] } }, "/steps/{id}": { "get": { "description": "Get a step by ID", "parameters": [ { "description": "Step ID", "in": "path", "name": "id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dto.StepResponse" } } }, "description": "OK" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Not Found" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/middleware.JSONAPIErrorResponse" } } }, "description": "Internal Server Error" } }, "security": [ { "APIKeyAuth": [] } ], "summary": "Get step", "tags": [ "steps" ] } } }, "servers": [ { "url": "/api/v1" } ] }