+6
-1
lex/type_schema.go
+6
-1
lex/type_schema.go
···
558
558
return "*util.LexiconTypeDecoder", nil
559
559
}
560
560
case "union":
561
-
return "*" + name + "_" + strings.Title(k), nil
561
+
if len(v.Refs) > 0 {
562
+
return "*" + name + "_" + strings.Title(k), nil
563
+
} else {
564
+
// an empty union is effectively an 'unknown', but with mandatory type indicator
565
+
return "*util.LexiconTypeDecoder", nil
566
+
}
562
567
case "blob":
563
568
return "*util.LexBlob", nil
564
569
case "array":