Setters: clear set-by if unspecified when setting a value

This commit is contained in:
Phillip Wittrock
2020-02-26 13:53:47 -08:00
parent 5707962df5
commit 573d7b7234
2 changed files with 50 additions and 4 deletions

View File

@@ -150,10 +150,8 @@ func (s SetOpenAPI) Filter(object *yaml.RNode) (*yaml.RNode, error) {
return nil, err
}
if s.SetBy != "" {
if err := def.PipeE(&yaml.FieldSetter{Name: "setBy", StringValue: s.SetBy}); err != nil {
return nil, err
}
if err := def.PipeE(&yaml.FieldSetter{Name: "setBy", StringValue: s.SetBy}); err != nil {
return nil, err
}
if s.Description != "" {