Skip to content

Commit 68a8802

Browse files
authored
Fix issue with primitive alias type handling (#3742)
In request building logic. We want to cast to the underlying type - not to the service type (e.g. string instead of UUID).
1 parent ce6ab46 commit 68a8802

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

http/codegen/service_data.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -791,7 +791,7 @@ func (sds *ServicesData) analyze(httpSvc *expr.HTTPServiceExpr) *ServiceData {
791791
_, ca.IsAliased = ca.FieldType.(expr.UserType)
792792
if ca.IsAliased {
793793
if svcData := sds.ServicesData.Get(svc.Name); svcData != nil {
794-
ca.ServiceTypeRef = svcData.Scope.GoTypeRef(&expr.AttributeExpr{Type: ca.FieldType})
794+
ca.ServiceTypeRef = svcData.Scope.GoTypeRef(&expr.AttributeExpr{Type: ca.Type})
795795
} else {
796796
ca.ServiceTypeRef = codegen.Goify(ca.FieldType.Name(), true)
797797
}

0 commit comments

Comments
 (0)