{
    "schemes": [],
    "swagger": "2.0",
    "info": {
        "description": "REST API for CodeKriti Service.",
        "title": "CodeKriti Service API",
        "contact": {},
        "version": "1.0.0"
    },
    "host": "",
    "basePath": "/",
    "paths": {
        "/healthz": {
            "get": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "health"
                ],
                "summary": "Get health",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.HealthStatus"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    }
                }
            }
        },
        "/v1/authors": {
            "get": {
                "description": "Query cost budget: max 250.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "authors"
                ],
                "summary": "List authors",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Limit",
                        "name": "limit",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "Offset",
                        "name": "offset",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Opaque cursor for the next page",
                        "name": "after",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Opaque cursor for the previous page",
                        "name": "before",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "Include total count",
                        "name": "count",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "enum": [
                                "created_at",
                                "email",
                                "id",
                                "name",
                                "updated_at"
                            ],
                            "type": "string"
                        },
                        "collectionFormat": "multi",
                        "description": "Select fields",
                        "name": "fields",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "collectionFormat": "multi",
                        "description": "Simple filters. Repeat for AND. Format: field:operator:value. Operators: eq, ne, gt, gte, lt, lte, like, in, is_null, not_null. Example: filter=status:eq:ACTIVE\u0026filter=role.name:eq:ADMIN. Filterable fields: email, name",
                        "name": "filter",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Advanced filter expression. Example: (status='ACTIVE' OR status='PENDING') AND (role.name='ADMIN' OR role.name='MANAGER')",
                        "name": "q",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.AuthorListResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    }
                }
            },
            "post": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "authors"
                ],
                "summary": "Create author",
                "parameters": [
                    {
                        "description": "Payload",
                        "name": "payload",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.AuthorCreateRequest"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.AuthorResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    }
                }
            }
        },
        "/v1/authors/{id}": {
            "get": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "authors"
                ],
                "summary": "Get author",
                "parameters": [
                    {
                        "type": "string",
                        "description": "ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.AuthorResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    }
                }
            },
            "put": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "authors"
                ],
                "summary": "Update author",
                "parameters": [
                    {
                        "type": "string",
                        "description": "ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Payload",
                        "name": "payload",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.AuthorUpdateRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.AuthorResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    }
                }
            },
            "delete": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "authors"
                ],
                "summary": "Delete author",
                "parameters": [
                    {
                        "type": "string",
                        "description": "ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    }
                }
            },
            "patch": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "authors"
                ],
                "summary": "Patch author",
                "parameters": [
                    {
                        "type": "string",
                        "description": "ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Payload",
                        "name": "payload",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.AuthorPatchRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.AuthorResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    }
                }
            }
        },
        "/v1/comments": {
            "get": {
                "description": "Query cost budget: max 250.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "comments"
                ],
                "summary": "List comments",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Limit",
                        "name": "limit",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "Offset",
                        "name": "offset",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Opaque cursor for the next page",
                        "name": "after",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Opaque cursor for the previous page",
                        "name": "before",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "Include total count",
                        "name": "count",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "enum": [
                                "author.created_at",
                                "author.email",
                                "author.id",
                                "author.name",
                                "author.updated_at",
                                "author_id",
                                "body",
                                "created_at",
                                "document_id",
                                "id",
                                "replies.author.created_at",
                                "replies.author.email",
                                "replies.author.id",
                                "replies.author.name",
                                "replies.author.updated_at",
                                "replies.author_id",
                                "replies.body",
                                "replies.comment_id",
                                "replies.created_at",
                                "replies.id",
                                "replies.updated_at",
                                "updated_at"
                            ],
                            "type": "string"
                        },
                        "collectionFormat": "multi",
                        "description": "Select fields",
                        "name": "fields",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "enum": [
                                "author",
                                "replies",
                                "replies.author"
                            ],
                            "type": "string"
                        },
                        "collectionFormat": "multi",
                        "description": "Include relations",
                        "name": "include",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "collectionFormat": "multi",
                        "description": "Simple filters. Repeat for AND. Format: field:operator:value. Operators: eq, ne, gt, gte, lt, lte, like, in, is_null, not_null. Example: filter=status:eq:ACTIVE\u0026filter=role.name:eq:ADMIN. Filterable fields: author_id, body, document_id, author.email, author.name, replies.author_id, replies.body, replies.comment_id, replies.author.email, replies.author.name",
                        "name": "filter",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Advanced filter expression. Example: (status='ACTIVE' OR status='PENDING') AND (role.name='ADMIN' OR role.name='MANAGER')",
                        "name": "q",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.CommentListResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    }
                }
            },
            "post": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "comments"
                ],
                "summary": "Create comment",
                "parameters": [
                    {
                        "description": "Payload",
                        "name": "payload",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.CommentCreateRequest"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.CommentResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    }
                }
            }
        },
        "/v1/comments/{id}": {
            "get": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "comments"
                ],
                "summary": "Get comment",
                "parameters": [
                    {
                        "type": "string",
                        "description": "ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.CommentResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    }
                }
            },
            "put": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "comments"
                ],
                "summary": "Update comment",
                "parameters": [
                    {
                        "type": "string",
                        "description": "ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Payload",
                        "name": "payload",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.CommentUpdateRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.CommentResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    }
                }
            },
            "delete": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "comments"
                ],
                "summary": "Delete comment",
                "parameters": [
                    {
                        "type": "string",
                        "description": "ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    }
                }
            },
            "patch": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "comments"
                ],
                "summary": "Patch comment",
                "parameters": [
                    {
                        "type": "string",
                        "description": "ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Payload",
                        "name": "payload",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.CommentPatchRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.CommentResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    }
                }
            }
        },
        "/v1/documents": {
            "get": {
                "description": "Query cost budget: max 250.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "documents"
                ],
                "summary": "List documents",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Limit",
                        "name": "limit",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "Offset",
                        "name": "offset",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Opaque cursor for the next page",
                        "name": "after",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Opaque cursor for the previous page",
                        "name": "before",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "Include total count",
                        "name": "count",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "enum": [
                                "author.created_at",
                                "author.email",
                                "author.id",
                                "author.name",
                                "author.updated_at",
                                "comments.author.created_at",
                                "comments.author.email",
                                "comments.author.id",
                                "comments.author.name",
                                "comments.author.updated_at",
                                "comments.author_id",
                                "comments.body",
                                "comments.created_at",
                                "comments.document_id",
                                "comments.id",
                                "comments.replies.author.created_at",
                                "comments.replies.author.email",
                                "comments.replies.author.id",
                                "comments.replies.author.name",
                                "comments.replies.author.updated_at",
                                "comments.replies.author_id",
                                "comments.replies.body",
                                "comments.replies.comment_id",
                                "comments.replies.created_at",
                                "comments.replies.id",
                                "comments.replies.updated_at",
                                "comments.updated_at",
                                "content",
                                "created_at",
                                "file_path",
                                "html_content",
                                "id",
                                "repo",
                                "title",
                                "updated_at"
                            ],
                            "type": "string"
                        },
                        "collectionFormat": "multi",
                        "description": "Select fields",
                        "name": "fields",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "enum": [
                                "author",
                                "comments",
                                "comments.author",
                                "comments.replies",
                                "comments.replies.author"
                            ],
                            "type": "string"
                        },
                        "collectionFormat": "multi",
                        "description": "Include relations",
                        "name": "include",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "collectionFormat": "multi",
                        "description": "Simple filters. Repeat for AND. Format: field:operator:value. Operators: eq, ne, gt, gte, lt, lte, like, in, is_null, not_null. Example: filter=status:eq:ACTIVE\u0026filter=role.name:eq:ADMIN. Filterable fields: content, file_path, html_content, repo, title, comments.replies.author.email, comments.replies.author.name, author.email, author.name, comments.author_id, comments.body, comments.document_id, comments.author.email, comments.author.name, comments.replies.author_id, comments.replies.body, comments.replies.comment_id",
                        "name": "filter",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Advanced filter expression. Example: (status='ACTIVE' OR status='PENDING') AND (role.name='ADMIN' OR role.name='MANAGER')",
                        "name": "q",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.DocumentListResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    }
                }
            },
            "post": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "documents"
                ],
                "summary": "Create document",
                "parameters": [
                    {
                        "description": "Payload",
                        "name": "payload",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.DocumentCreateRequest"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.DocumentResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    }
                }
            }
        },
        "/v1/documents/{id}": {
            "get": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "documents"
                ],
                "summary": "Get document",
                "parameters": [
                    {
                        "type": "string",
                        "description": "ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.DocumentResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    }
                }
            },
            "put": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "documents"
                ],
                "summary": "Update document",
                "parameters": [
                    {
                        "type": "string",
                        "description": "ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Payload",
                        "name": "payload",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.DocumentUpdateRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.DocumentResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    }
                }
            },
            "delete": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "documents"
                ],
                "summary": "Delete document",
                "parameters": [
                    {
                        "type": "string",
                        "description": "ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    }
                }
            },
            "patch": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "documents"
                ],
                "summary": "Patch document",
                "parameters": [
                    {
                        "type": "string",
                        "description": "ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Payload",
                        "name": "payload",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.DocumentPatchRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.DocumentResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    }
                }
            }
        },
        "/v1/pipeline/documents": {
            "post": {
                "description": "Creates or updates a document using repo + file_path as identity and renders markdown to HTML.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "documents"
                ],
                "summary": "Upsert document from markdown (pipeline)",
                "parameters": [
                    {
                        "description": "Payload",
                        "name": "payload",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.DocumentPipelineUpsertRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.DocumentResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    }
                }
            }
        },
        "/v1/replies": {
            "get": {
                "description": "Query cost budget: max 250.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "replies"
                ],
                "summary": "List replies",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Limit",
                        "name": "limit",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "Offset",
                        "name": "offset",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Opaque cursor for the next page",
                        "name": "after",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Opaque cursor for the previous page",
                        "name": "before",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "Include total count",
                        "name": "count",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "enum": [
                                "author.created_at",
                                "author.email",
                                "author.id",
                                "author.name",
                                "author.updated_at",
                                "author_id",
                                "body",
                                "comment_id",
                                "created_at",
                                "id",
                                "updated_at"
                            ],
                            "type": "string"
                        },
                        "collectionFormat": "multi",
                        "description": "Select fields",
                        "name": "fields",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "enum": [
                                "author"
                            ],
                            "type": "string"
                        },
                        "collectionFormat": "multi",
                        "description": "Include relations",
                        "name": "include",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "collectionFormat": "multi",
                        "description": "Simple filters. Repeat for AND. Format: field:operator:value. Operators: eq, ne, gt, gte, lt, lte, like, in, is_null, not_null. Example: filter=status:eq:ACTIVE\u0026filter=role.name:eq:ADMIN. Filterable fields: author_id, body, comment_id, author.email, author.name",
                        "name": "filter",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Advanced filter expression. Example: (status='ACTIVE' OR status='PENDING') AND (role.name='ADMIN' OR role.name='MANAGER')",
                        "name": "q",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ReplyListResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    }
                }
            },
            "post": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "replies"
                ],
                "summary": "Create reply",
                "parameters": [
                    {
                        "description": "Payload",
                        "name": "payload",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ReplyCreateRequest"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ReplyResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    }
                }
            }
        },
        "/v1/replies/{id}": {
            "get": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "replies"
                ],
                "summary": "Get reply",
                "parameters": [
                    {
                        "type": "string",
                        "description": "ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ReplyResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    }
                }
            },
            "put": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "replies"
                ],
                "summary": "Update reply",
                "parameters": [
                    {
                        "type": "string",
                        "description": "ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Payload",
                        "name": "payload",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ReplyUpdateRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ReplyResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    }
                }
            },
            "delete": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "replies"
                ],
                "summary": "Delete reply",
                "parameters": [
                    {
                        "type": "string",
                        "description": "ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    }
                }
            },
            "patch": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "replies"
                ],
                "summary": "Patch reply",
                "parameters": [
                    {
                        "type": "string",
                        "description": "ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Payload",
                        "name": "payload",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ReplyPatchRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ReplyResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/api_httpapi_handlers.ErrorBody"
                        }
                    }
                }
            }
        }
    },
    "definitions": {
        "api_httpapi_handlers.AuthorCreateRequest": {
            "type": "object",
            "properties": {
                "email": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                }
            }
        },
        "api_httpapi_handlers.AuthorListResponse": {
            "type": "object",
            "properties": {
                "items": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/api_httpapi_handlers.AuthorResponse"
                    }
                },
                "limit": {
                    "type": "integer"
                },
                "next_cursor": {
                    "type": "string"
                },
                "offset": {
                    "type": "integer"
                },
                "total": {
                    "type": "integer"
                }
            }
        },
        "api_httpapi_handlers.AuthorPatchRequest": {
            "type": "object",
            "properties": {
                "email": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                }
            }
        },
        "api_httpapi_handlers.AuthorResponse": {
            "type": "object",
            "properties": {
                "created_at": {
                    "type": "string"
                },
                "email": {
                    "type": "string"
                },
                "id": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "updated_at": {
                    "type": "string"
                }
            }
        },
        "api_httpapi_handlers.AuthorUpdateRequest": {
            "type": "object",
            "properties": {
                "email": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                }
            }
        },
        "api_httpapi_handlers.CommentCreateRequest": {
            "type": "object",
            "properties": {
                "author_id": {
                    "type": "string"
                },
                "body": {
                    "type": "string"
                },
                "document_id": {
                    "type": "string"
                }
            }
        },
        "api_httpapi_handlers.CommentListResponse": {
            "type": "object",
            "properties": {
                "items": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/api_httpapi_handlers.CommentResponse"
                    }
                },
                "limit": {
                    "type": "integer"
                },
                "next_cursor": {
                    "type": "string"
                },
                "offset": {
                    "type": "integer"
                },
                "total": {
                    "type": "integer"
                }
            }
        },
        "api_httpapi_handlers.CommentPatchRequest": {
            "type": "object",
            "properties": {
                "author_id": {
                    "type": "string"
                },
                "body": {
                    "type": "string"
                },
                "document_id": {
                    "type": "string"
                }
            }
        },
        "api_httpapi_handlers.CommentResponse": {
            "type": "object",
            "properties": {
                "author": {
                    "$ref": "#/definitions/api_httpapi_handlers.AuthorResponse"
                },
                "author_id": {
                    "type": "string"
                },
                "body": {
                    "type": "string"
                },
                "created_at": {
                    "type": "string"
                },
                "document_id": {
                    "type": "string"
                },
                "id": {
                    "type": "string"
                },
                "replies": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/api_httpapi_handlers.ReplyResponse"
                    }
                },
                "updated_at": {
                    "type": "string"
                }
            }
        },
        "api_httpapi_handlers.CommentUpdateRequest": {
            "type": "object",
            "properties": {
                "author_id": {
                    "type": "string"
                },
                "body": {
                    "type": "string"
                },
                "document_id": {
                    "type": "string"
                }
            }
        },
        "api_httpapi_handlers.DocumentCreateRequest": {
            "type": "object",
            "properties": {
                "content": {
                    "type": "string"
                },
                "file_path": {
                    "type": "string"
                },
                "repo": {
                    "type": "string"
                },
                "title": {
                    "type": "string"
                }
            }
        },
        "api_httpapi_handlers.DocumentListResponse": {
            "type": "object",
            "properties": {
                "items": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/api_httpapi_handlers.DocumentResponse"
                    }
                },
                "limit": {
                    "type": "integer"
                },
                "next_cursor": {
                    "type": "string"
                },
                "offset": {
                    "type": "integer"
                },
                "total": {
                    "type": "integer"
                }
            }
        },
        "api_httpapi_handlers.DocumentPatchRequest": {
            "type": "object",
            "properties": {
                "content": {
                    "type": "string"
                },
                "file_path": {
                    "type": "string"
                },
                "repo": {
                    "type": "string"
                },
                "title": {
                    "type": "string"
                }
            }
        },
        "api_httpapi_handlers.DocumentPipelineUpsertRequest": {
            "type": "object",
            "required": [
                "file_path",
                "markdown",
                "repo"
            ],
            "properties": {
                "file_path": {
                    "type": "string"
                },
                "markdown": {
                    "type": "string"
                },
                "repo": {
                    "type": "string"
                },
                "title": {
                    "type": "string"
                }
            }
        },
        "api_httpapi_handlers.DocumentResponse": {
            "type": "object",
            "properties": {
                "author": {
                    "$ref": "#/definitions/api_httpapi_handlers.AuthorResponse"
                },
                "comments": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/api_httpapi_handlers.CommentResponse"
                    }
                },
                "content": {
                    "type": "string"
                },
                "created_at": {
                    "type": "string"
                },
                "file_path": {
                    "type": "string"
                },
                "html_content": {
                    "type": "string"
                },
                "id": {
                    "type": "string"
                },
                "repo": {
                    "type": "string"
                },
                "title": {
                    "type": "string"
                },
                "updated_at": {
                    "type": "string"
                }
            }
        },
        "api_httpapi_handlers.DocumentUpdateRequest": {
            "type": "object",
            "properties": {
                "content": {
                    "type": "string"
                },
                "file_path": {
                    "type": "string"
                },
                "repo": {
                    "type": "string"
                },
                "title": {
                    "type": "string"
                }
            }
        },
        "api_httpapi_handlers.ErrorBody": {
            "type": "object",
            "properties": {
                "code": {
                    "type": "string"
                },
                "details": {},
                "message": {
                    "type": "string"
                },
                "request_id": {
                    "type": "string"
                }
            }
        },
        "api_httpapi_handlers.HealthStatus": {
            "type": "object",
            "properties": {
                "checks": {
                    "type": "object",
                    "additionalProperties": {
                        "type": "string"
                    }
                },
                "status": {
                    "type": "string"
                }
            }
        },
        "api_httpapi_handlers.ReplyCreateRequest": {
            "type": "object",
            "properties": {
                "author_id": {
                    "type": "string"
                },
                "body": {
                    "type": "string"
                },
                "comment_id": {
                    "type": "string"
                }
            }
        },
        "api_httpapi_handlers.ReplyListResponse": {
            "type": "object",
            "properties": {
                "items": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/api_httpapi_handlers.ReplyResponse"
                    }
                },
                "limit": {
                    "type": "integer"
                },
                "next_cursor": {
                    "type": "string"
                },
                "offset": {
                    "type": "integer"
                },
                "total": {
                    "type": "integer"
                }
            }
        },
        "api_httpapi_handlers.ReplyPatchRequest": {
            "type": "object",
            "properties": {
                "author_id": {
                    "type": "string"
                },
                "body": {
                    "type": "string"
                },
                "comment_id": {
                    "type": "string"
                }
            }
        },
        "api_httpapi_handlers.ReplyResponse": {
            "type": "object",
            "properties": {
                "author": {
                    "$ref": "#/definitions/api_httpapi_handlers.AuthorResponse"
                },
                "author_id": {
                    "type": "string"
                },
                "body": {
                    "type": "string"
                },
                "comment_id": {
                    "type": "string"
                },
                "created_at": {
                    "type": "string"
                },
                "id": {
                    "type": "string"
                },
                "updated_at": {
                    "type": "string"
                }
            }
        },
        "api_httpapi_handlers.ReplyUpdateRequest": {
            "type": "object",
            "properties": {
                "author_id": {
                    "type": "string"
                },
                "body": {
                    "type": "string"
                },
                "comment_id": {
                    "type": "string"
                }
            }
        }
    }
}