func (spec *ActionSpec) InsertDefaults(target map[string]interface{}) (map[string]interface{}, error) {
	specLoader := gjs.NewGoLoader(spec.Params)
	schema, err := gjs.NewSchema(specLoader)
	if err != nil {
		return target, err
	}

	return schema.InsertDefaults(target)
}
// InsertDefaults inserts the schema's default values in target using
// github.com/juju/gojsonschema.  If a nil target is received, an empty map
// will be created as the target.  The target is then mutated to include the
// defaults.
//
// The returned map will be the transformed or created target map.
InsertDefaults inserts the schema's default values in target using
github.com/juju/gojsonschema.  If a nil target is received, an empty map
will be created as the target.  The target is then mutated to include the
defaults.

The returned map will be the transformed or created target map.
// InsertDefaults inserts the schema ' s default values in target using // github . com / juju / gojsonschema . If a nil target is received an empty map // will be created as the target . The target is then mutated to include the // defaults . // // The returned map will be the transformed or created target map .
func (spec *ActionSpec) InsertDefaults(target map[string]interface{}) (map[string]interface{}, error) {
	specLoader := gjs.NewGoLoader(spec.Params)
	schema, err := gjs.NewSchema(specLoader)
	if err != nil {
		return target, err
	}
	return schema.InsertDefaults(target)
}
func ( spec * ActionSpec ) InsertDefaults ( target map [ string ] interface { } ) ( map [ string ] interface { } , error ) { specLoader := gjs . NewGoLoader ( spec . Params ) schema , err := gjs . NewSchema ( specLoader ) if err != nil { return target , err } return schema . InsertDefaults ( target ) }
InsertDefaults inserts the schema's default values in target using
github.com/juju/gojsonschema.
InsertDefaults inserts the schema ' s default values in target using github . com / juju / gojsonschema .