Required setters for apply

This commit is contained in:
Phani Teja Marupaka
2020-06-22 20:17:17 -07:00
parent a895220743
commit 68ab3b87d9
12 changed files with 75 additions and 25 deletions

View File

@@ -419,6 +419,10 @@ func (s SetOpenAPI) Filter(object *yaml.RNode) (*yaml.RNode, error) {
return nil, err
}
if err := def.PipeE(&yaml.FieldSetter{Name: "isSet", StringValue: "true"}); err != nil {
return nil, err
}
if s.Description != "" {
d, err := object.Pipe(yaml.LookupCreate(
yaml.MappingNode, "openAPI", "definitions", key))