Upgrade to gopkg.in/yaml.v2 v2.3.0

This commit is contained in:
jregan
2020-06-30 17:22:27 -07:00
parent a689e0c2b4
commit 436dada184
34 changed files with 64 additions and 11 deletions

View File

@@ -38,8 +38,8 @@ type Add struct {
// Type is the type of the setter value
Type string
// Count is the number of fields the setter applies to
Count int
// Count is the number of fields the setter applies to
Count int
}
// Filter implements yaml.Filter
@@ -108,7 +108,7 @@ func (a *Add) visitScalar(object *yaml.RNode, p string, _ *openapi.ResourceSchem
if a.FieldValue != "" && a.FieldValue != object.YNode().Value {
return nil
}
a.Count++
a.Count++
return a.addRef(object)
}

View File

@@ -74,7 +74,7 @@ func (c SetterCreator) Create(openAPIPath, resourcesPath string) error {
// Update the OpenAPI definitions to hace the setter
sd := setters2.SetterDefinition{
Name: c.Name, Value: c.FieldValue, SetBy: c.SetBy, Description: c.Description,
Count: a.Count, Type: c.Type, Schema: schema, Required: c.Required,
Count: a.Count, Type: c.Type, Schema: schema, Required: c.Required,
}
if err := sd.AddToFile(openAPIPath); err != nil {
return err