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.
Description of your changes
Closes https://github.com/crossplane/function-sdk-go/pull/123 Closes https://github.com/crossplane/function-sdk-go/pull/121
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. See https://github.com/crossplane-contrib/function-patch-and-transform/pull/91#issuecomment-1942672309.
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.
I have:
make reviewable
to ensure this PR is ready for review.How has this code been tested