include alias even if we don't need it

This commit is contained in:
Ben Kraft
2021-04-15 11:36:46 -07:00
parent e597cac74c
commit 136ac7729f
5 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -267,7 +267,7 @@ func (builder *typeBuilder) writeField(field field) error {
if builder.schema.Types[typ.Name()].IsAbstractType() {
// abstract types are handled in our UnmarshalJSON
builder.WriteString(" `json:\"-\"`")
} else if jsonName != goName {
} else {
fmt.Fprintf(builder, " `json:\"%s\"`", jsonName)
}
builder.WriteRune('\n')