From a45ef32cffa64489b0ddfa078cb47d102280f97a Mon Sep 17 00:00:00 2001 From: Raphael Simon Date: Sun, 20 Jul 2025 14:04:55 -0700 Subject: [PATCH] Fix issue with primitive alias type handling In request building logic. We want to cast to the underlying type - not to the service type (e.g. string instead of UUID). --- http/codegen/service_data.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/http/codegen/service_data.go b/http/codegen/service_data.go index 7d3d55dcd6..c3f5a5cfe7 100644 --- a/http/codegen/service_data.go +++ b/http/codegen/service_data.go @@ -791,7 +791,7 @@ func (sds *ServicesData) analyze(httpSvc *expr.HTTPServiceExpr) *ServiceData { _, ca.IsAliased = ca.FieldType.(expr.UserType) if ca.IsAliased { if svcData := sds.ServicesData.Get(svc.Name); svcData != nil { - ca.ServiceTypeRef = svcData.Scope.GoTypeRef(&expr.AttributeExpr{Type: ca.FieldType}) + ca.ServiceTypeRef = svcData.Scope.GoTypeRef(&expr.AttributeExpr{Type: ca.Type}) } else { ca.ServiceTypeRef = codegen.Goify(ca.FieldType.Name(), true) }