Walk: opt-in to visiting map keys when walking map entries

This commit is contained in:
Phillip Wittrock
2020-03-08 16:52:13 -07:00
parent 6944cea234
commit 63ff34ffe2
3 changed files with 32 additions and 0 deletions

View File

@@ -32,6 +32,10 @@ type Walker struct {
// fields which it doesn't have the schema based on the fields in the
// list elements.
InferAssociativeLists bool
// VisitKeysAsScalars if true will call VisitScalar on map entry keys,
// providing nil as the OpenAPI schema.
VisitKeysAsScalars bool
}
func (l Walker) Kind() yaml.Kind {