AspNetCoreOData icon indicating copy to clipboard operation
AspNetCoreOData copied to clipboard

EdmChangedObjectCollection returns response with control annotations without "@odata" prefix regardless of version

Open Xriuk opened this issue 4 months ago • 5 comments

Assemblies affected ASP.NET Core OData 8.2.3

Describe the bug When returning a delta payload via EdmChangedObjectCollection, the returned JSON response contains control annotations with short names (eg: @context instead of @odata.context), regardless of OData response version header (4.0 must return long ones, while 4.01 could return short ones). Other results, like a regular list of entities, produce correctly long annotations, like @odata.context.

Reproduce steps Inside any controller, return a EdmChangedObjectCollection instance with few entries. The response should contain OData-Version 4.0 header with @context annotation.

Expected behavior If the response header is OData-Version 4.0 the annotations should be long like @odata.context.

Xriuk avatar Feb 07 '24 10:02 Xriuk