From 77edcd60058f2b789a22fa8cf5157a272017a6b0 Mon Sep 17 00:00:00 2001 From: cssbruno Date: Thu, 11 Jun 2026 15:06:47 -0300 Subject: [PATCH] fix(compiler): skip invalid contract routes in conflict checks --- internal/compiler/routes.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/compiler/routes.go b/internal/compiler/routes.go index 73eb085..cde14a9 100644 --- a/internal/compiler/routes.go +++ b/internal/compiler/routes.go @@ -328,6 +328,12 @@ func routeRegistrations(pages []gwdkir.Page, endpoints []gwdkir.GoEndpoint, refs if strings.TrimSpace(ref.Method) == "" || strings.TrimSpace(ref.Path) == "" { continue } + if source.BackendRouteMethod(ref.Method) != contractReferenceRouteMethod(ref.Kind) { + continue + } + if err := source.ValidateBackendRoutePath(ref.Path); err != nil { + continue + } info, issues := parseRoute(ref.Path) if len(issues) > 0 { continue