function-sdk-go/resource
Nic Cope 48e682947c 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.

https://github.com/crossplane-contrib/function-patch-and-transform/pull/91#issuecomment-1942672309

Signed-off-by: Nic Cope <nicc@rk0n.org>
2024-02-14 02:55:44 -08:00
..
composed Clear out empty object metadata if it exists after conversion 2023-10-30 15:47:14 -07:00
composite Sync with upstream crossplane-runtime changes 2023-10-24 14:16:20 -07:00
resource.go Reject unknown fields when converting from Struct to Object 2024-02-14 02:55:44 -08:00