diff --git a/internal/handlers/sdlc_generate.go b/internal/handlers/sdlc_generate.go index b5e4e9b..26ce4f6 100644 --- a/internal/handlers/sdlc_generate.go +++ b/internal/handlers/sdlc_generate.go @@ -24,10 +24,12 @@ func NewSDLCGenerateHandler(generateSvc *service.SDLCGenerateService) *SDLCGener } // Mount registers the generate endpoint on the router. +// Note: Uses direct route to avoid conflict with /projects/{id}/sdlc in sdlc.go. +// Creating a Route() group at /projects/{id}/sdlc/features/{slug} shadows +// the SDLCHandler's nested routes like /features/{slug}/artifacts/{type}/approve. func (h *SDLCGenerateHandler) Mount(r api.Router) { - r.Route("/projects/{id}/sdlc/features/{slug}", func(r chi.Router) { - r.With(auth.RequireScope(auth.ScopeProjectsExecute, auth.ScopeAdmin)).Post("/generate", h.Generate) - }) + r.With(auth.RequireScope(auth.ScopeProjectsExecute, auth.ScopeAdmin)). + Post("/projects/{id}/sdlc/features/{slug}/generate", h.Generate) } // GenerateRequest is the request body for POST /projects/{id}/sdlc/features/{slug}/generate.