Commit 48e6829
committed
Reject unknown fields when converting from Struct to Object
This is mostly useful when a function loads its input from the
RunFunctionRequest. Crossplane isn't (yet) aware of input schema and
will send anything the user supplies.
Right now that could include extra unknown, misindented, or typod fields
and those will be silently ignored by the function. With this change in
place they will result in an error.
This code will also be used to load desired and observed resource state,
but it's unlikely for those to be invalid.
This is a small behavior change, but I feel okay with it. The new
behavior is safer, probably won't affect anyone, and we're pre 1.0.
crossplane-contrib/function-patch-and-transform#91 (comment)
Signed-off-by: Nic Cope <nicc@rk0n.org>1 parent f1c048d commit 48e6829
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
| 94 | + | |
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| |||
0 commit comments