File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,8 @@ import (
18
18
"github.com/go-openapi/validate"
19
19
)
20
20
21
- // ApplyDefaults applies defaults to data.
21
+ // ApplyDefaults applies defaults to the underlying data of the result. The data must be a JSON
22
+ // struct as returned by json.Unmarshal.
22
23
func ApplyDefaults (r * validate.Result ) {
23
24
fieldSchemata := r .FieldSchemata ()
24
25
for key , schemata := range fieldSchemata {
Original file line number Diff line number Diff line change @@ -18,7 +18,8 @@ import (
18
18
"github.com/go-openapi/validate"
19
19
)
20
20
21
- // Prune recursively removes all non-specified fields from the data.
21
+ // Prune recursively removes all non-specified fields from the underlying data of the result.
22
+ // The data must be a JSON struct as returned by json.Unmarshal.
22
23
func Prune (r * validate.Result ) {
23
24
prune (r .Data (), r )
24
25
}
You can’t perform that action at this time.
0 commit comments