Skip to content

Commit 1788db6

Browse files
committed
Clarify post-algorithm inputs
1 parent 17d85e3 commit 1788db6

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

post/defaulter.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ import (
1818
"github.com/go-openapi/validate"
1919
)
2020

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.
2223
func ApplyDefaults(r *validate.Result) {
2324
fieldSchemata := r.FieldSchemata()
2425
for key, schemata := range fieldSchemata {

post/prune.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ import (
1818
"github.com/go-openapi/validate"
1919
)
2020

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.
2223
func Prune(r *validate.Result) {
2324
prune(r.Data(), r)
2425
}

0 commit comments

Comments
 (0)