Is your feature request related to a problem? Please describe.
I would like the package to support in the common ID validation when processing PATCH data, i.e. that the ID in the document matches the one in the URL path.
Describe the solution you'd like
A UnmarshalExpectedID configuration option that generates an error if the ID does not match or it was a multiple data document.
Describe alternatives you've considered
Because the unmarshaler is private it is difficult to add new functional options in client code without wrapping all existing functional options.
Additional context
I have a full PR ready implementing this function, with tests.
Is your feature request related to a problem? Please describe.
I would like the package to support in the common ID validation when processing PATCH data, i.e. that the ID in the document matches the one in the URL path.
Describe the solution you'd like
A
UnmarshalExpectedIDconfiguration option that generates an error if the ID does not match or it was a multiple data document.Describe alternatives you've considered
Because the unmarshaler is private it is difficult to add new functional options in client code without wrapping all existing functional options.
Additional context
I have a full PR ready implementing this function, with tests.