Applyconfig-gen: Only the root type is an applyconfiguration

This commit is contained in:
Alvaro Aleman
2025-06-27 13:50:55 -04:00
parent 6720f62d82
commit 9af684ae09

View File

@@ -115,7 +115,10 @@ func (g *applyConfigurationGenerator) GenerateType(c *generator.Context, t *type
sw.Do(constructor, typeParams)
}
}
g.generateIsApplyConfiguration(typeParams.ApplyConfig.ApplyConfiguration, sw)
if typeParams.Tags.GenerateClient || hasTypeMetaField(t) {
g.generateIsApplyConfiguration(typeParams.ApplyConfig.ApplyConfiguration, sw)
}
g.generateWithFuncs(t, typeParams, sw, nil, &[]string{})
g.generateGetters(t, typeParams, sw, nil)
return sw.Error()