Errors passed to model state don't contain property that failed
When executing JsonPatchDocument.ApplyTo(obj) the property name doesn't get passed into the error message.
e.g. passing "" to a required property returns "The value '' is invalid for target location." rather then "The value '' is invalid for target {property name}."
Looking at the surrounding code and making some pretty big assumptions i believe this could be resolved by changing:
errorMessage = Resources.FormatInvalidValueForProperty(value);
To
errorMessage = Resources.FormatInvalidValueForProperty(value, segment);
Certainly for my use case this would be an awesome change, and I imagine this would be very helpful to others as well :).
Hmm, that definitely doesn't sound right. I'll look into it and provide a fix :)