Conversation
@ElizabethOkerio If |
This is what happens from if (odataVersion < ODataVersion.V401)
{
Validations = ValidationKinds.All;
this.ReadUntypedAsString = true;
this.MaxProtocolVersion = ODataConstants.ODataDefaultProtocolVersion;
this.EnableReadingODataAnnotationWithoutPrefix = false;
}
else
{
Validations = ValidationKinds.All & ~ValidationKinds.ThrowOnUndeclaredPropertyForNonOpenType;
this.ReadUntypedAsString = false;
this.MaxProtocolVersion = odataVersion;
this.EnableReadingODataAnnotationWithoutPrefix = true;
}Should we update this from ODL to make sure the As an alternative, users can pass custom instances of the |
This PR fixes: OData/odata.net#3004 and OData/odata.net#3009.
It sets the
MaxProtocolVersionto have the same version as theOData-Version. Currently, V4 is set as the default Protocol Version. If someone uses theV401 OData-Version, theMaxProtocolVersionis not updated which causes exceptions. Even settingOData-MaxVersiondoes not fix this problem.