Add OpenAPI specification support to the agent. Implement a new endpoint for serving OpenAPI documentation and refactor the existing handler to utilize the new specification. Add tests to ensure the correctness of the OpenAPI spec generation.

This commit is contained in:
2026-08-28 13:23:41 +03:00
parent 4f8ee5f6be
commit 6a070391c8
4 changed files with 429 additions and 17 deletions
+1
View File
@@ -68,6 +68,7 @@ func (a *Agent) Serve() error {
mux.HandleFunc("/", a.handleWeb)
mux.HandleFunc("/health", a.handleHealth)
mux.HandleFunc("/healthz", a.handleHealth)
mux.HandleFunc("/openapi", a.handleOpenAPI)
mux.HandleFunc("/openapi.json", a.handleOpenAPI)
mux.HandleFunc("/api/v1/status", a.handleStatus)
mux.HandleFunc("/api/v1/files", a.handleFiles)