refactor: retire /workflows endpoint, use X-Service: workflow instead
CI / CI (pull_request) Successful in 3m12s

Remove deprecated /workflows HTTP endpoint in favor of unified X-Service
header routing. All workflow operations now route through:

  X-Service: workflow
  X-Resource: {action} (start, describe, signal, query, etc)

This consolidates routing patterns and allows users to specify domain/
namespace via request payload instead of path prefixes.

Changes:
- Remove internal/proxy/workflows.go (484 lines of predefined workflows)
- Remove internal/proxy/workflows_test.go
- Remove /workflows handler from proxy.ServeHTTP()
- Update README.md to document X-Service routing pattern
- Add migration note: use X-Service: workflow instead of /workflows

WorkflowAdapter in serviceadapter/ handles X-Service: workflow requests
and forwards to Temporal gRPC API. Users can now specify domain/namespace
in request payload for multi-tenant workflow access.

Related: #26
This commit is contained in:
Admin Bot
2026-09-14 08:18:36 +09:00
parent cc9a32f53a
commit b0f608f145
4 changed files with 30 additions and 778 deletions
+2 -7
View File
@@ -271,13 +271,8 @@ func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
return
}
// Handle /workflows endpoint (workflow orchestration)
if r.URL.Path == "/workflows" {
h.handleWorkflow(w, r)
return
}
// Try to find a matching route (including body-based dispatch for /v1/chat/completions)
// Try to find a matching route (including body-based dispatch for /v1/chat/completions).
// Note: /workflows endpoint is deprecated. Use X-Service: workflow + X-Resource headers instead.
route, err := h.RouteRequest(r)
// Check if this is a model validation error (from body-based dispatch)