Changes to enable validation for objects generated by InputFormatters.

UnitTests + FunctionalTests for the same.
This doesn't work if the body parameter is nested inside. We probably need to change validation to account for this along with @harshgMSFT's changes.