Closed cierpuchaw closed 3 years ago
This is probably the most important piece of context for this PR: https://github.com/cloudwan/gohan/blob/master/schema/property.go#L231
If schema subobject contains a "default:" clause then it's used for the value of DefaultMask. Otherwise, if the subobject is an object (instead of an array or a "primitive" type) we recursively cache default values all the way down.
Middle level objects do not always have a default value but their children might. Use DefaultMask (as it's fully computed) instead of only Default in order to handle such cases.