You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ODL7 throwing "The ODataMessageWriterSetting.ODataUri must be set when writing individual property" when ODataMessageWriterSetting.ODataUri is set.
#1022
Our TestComposibleFunctionReturningComplexType unit test which tries to write { value: "value1" } response for a GET ens/id/microsoft.graph.F8/P1 request using the attached CSDL fails with the below exception:
Microsoft.OData.ODataExceptionoccurred
HResult=-2146233079
Message=The ODataMessageWriterSetting.ODataUri must be setwhen writing individual property.
Source=Microsoft.OData.CoreStackTrace:
at Microsoft.OData.ODataContextUriBuilder.ValidateResourcePath(ODataContextUrlInfocontextUrlInfo)
at Microsoft.OData.ODataContextUriBuilder.BuildContextUri(ODataPayloadKindpayloadKind,ODataContextUrlInfocontextInfo)
at Microsoft.OData.JsonLight.ODataJsonLightSerializer.WriteContextUriProperty(ODataPayloadKindpayloadKind,Func`1contextUrlInfoGen,ODataContextUrlInfoparentContextUrlInfo,StringpropertyName)
at Microsoft.OData.JsonLight.ODataJsonLightPropertySerializer.<>c__DisplayClass5_0.<WriteTopLevelProperty>b__0()
at Microsoft.OData.JsonLight.ODataJsonLightSerializer.WriteTopLevelPayload(ActionpayloadWriterAction)
at Microsoft.OData.JsonLight.ODataJsonLightPropertySerializer.WriteTopLevelProc:\git\AD\AggregatorService\src\dev\UnitTests\Controller.UnitTest\Resources\Ops.csdl perty(ODataPropertyproperty)
at Microsoft.OData.JsonLight.ODataJsonLightOutputContext.WritePropertyImplementation(ODataPropertyproperty)
at Microsoft.OData.JsonLight.ODataJsonLightOutputContext.WriteProperty(ODataPropertyproperty)
at Microsoft.OData.ODataMessageWriter.<>c__DisplayClass55_0.<WriteProperty>b__0(ODataOutputContextcontext)
at Microsoft.OData.ODataMessageWriter.WriteToOutput(ODataPayloadKindpayloadKind,Action`1writeAction)at Microsoft.OData.ODataMessageWriter.WriteProperty(ODataPropertyproperty)
at Microsoft.Online.AggregatorService.Controller.ODataResponseWriter.WriteResponse(RequestContextcontext,JObjectjsonObject,ParsedRequestStatestate,StreamresponseStream,BooleandisableStreamDisposal)in c:\git\AD\AggregatorService\src\dev\Controller\ODataResponseWriter.cs:line 339
InnerException:
The ODataMessageWriterSetting.ODataUri is actually set:
writerSettings.ODataUri.BuildUri(ODataUrlKeyDelimiter.Parentheses).ToString() returns:
returns http://localgateway/beta/ens('id')/microsoft.graph.F8/P1
Assemblies affected
Which assemblies and versions are known to be affected e.g. OData .Net lib 7.3
Reproduce steps
If we set the path as "~/entityset/key/operation/property" as below:
Last issue with moving MS Graph to ODLv7.
Our TestComposibleFunctionReturningComplexType unit test which tries to write { value: "value1" } response for a GET ens/id/microsoft.graph.F8/P1 request using the attached CSDL fails with the below exception:
Assemblies affected
Which assemblies and versions are known to be affected e.g. OData .Net lib 7.3
Reproduce steps
If we set the path as "~/entityset/key/operation/property" as below:
http://localgateway/beta/ens('id')/microsoft.graph.F8/P1
It will throw exception when serialize the top level property.
Expected result
Pass.
Actual result
Throw exception.
What is actually happening.
Additional detail
Optional, details of the root cause if known. Delete this section if you have no additional details to add.
The text was updated successfully, but these errors were encountered: