{"openapi":"3.1.0","info":{"title":"Joelclaw Docs API","version":"0.2.0","description":"Search and read Joelclaw's indexed document corpus through the public, rate-limited docs proxy."},"servers":[{"url":"https://joelclaw.com/api/docs"}],"paths":{"/":{"get":{"operationId":"discover_docs","summary":"Discover the docs API","description":"Return the docs API resource map, examples, and links.","responses":{"200":{"description":"Discovery document","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/openapi.json":{"get":{"operationId":"get_openapi_schema","summary":"Get the OpenAPI schema","description":"Return the current Joelclaw docs API contract.","responses":{"200":{"description":"OpenAPI document","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/ui":{"get":{"operationId":"get_swagger_ui","summary":"Get the Swagger UI","description":"Return the human-readable Swagger UI HTML.","responses":{"200":{"description":"Swagger UI HTML","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/health":{"get":{"operationId":"check_docs_health","summary":"Check docs API health","description":"Check whether the docs API and its search index are ready.","responses":{"200":{"description":"Healthy docs API","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/search":{"get":{"operationId":"search_docs","summary":"Search Joelclaw docs","description":"Search indexed document chunks. Use each returned chunk ID with get_chunk for exact source context.","parameters":[{"name":"q","in":"query","required":true,"description":"Search query","schema":{"type":"string"}},{"name":"page","in":"query","description":"One-based result page","schema":{"type":"integer","minimum":1,"default":1}},{"name":"perPage","in":"query","description":"Results per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":10}},{"name":"semantic","in":"query","description":"Use semantic search when true","schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"Search results","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/docs":{"get":{"operationId":"list_docs","summary":"List indexed documents","description":"Page through the indexed document catalog.","parameters":[{"name":"page","in":"query","description":"One-based result page","schema":{"type":"integer","minimum":1,"default":1}},{"name":"perPage","in":"query","description":"Documents per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"Document page","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/docs/{id}":{"get":{"operationId":"get_doc","summary":"Get a document by ID","description":"Return metadata and content for one indexed document.","parameters":[{"name":"id","in":"path","required":true,"description":"Document ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Document","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Document not found"}}}},"/chunks/{id}":{"get":{"operationId":"get_chunk","summary":"Get a source chunk by ID","description":"Return one exact source chunk. Use lite=true to omit heavy fields. Request embeddings only when vector data is required.","parameters":[{"name":"id","in":"path","required":true,"description":"Chunk ID","schema":{"type":"string"}},{"name":"lite","in":"query","description":"Return a lighter payload","schema":{"type":"boolean","default":false}},{"name":"includeEmbedding","in":"query","description":"Include embedding vectors","schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"Source chunk","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Chunk not found"}}}}}}