microsoft / microsoft/Vipr

Enable materialization of derived types based on odata.type property

Open
#43 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

core c-sharp writer tracked up-for-grabs
Dominant language
C#
Stars
111
Forks
50
PR merge metrics
No merged PRs in 30d

Description

When a request to an OData v4 service returns a base Entity Type, according to $metadata, it is feasible for the service to actually return a derived type. Today, the CSharp proxy will ignore the @odata.type property and materialize the entity as the Base type. Ideally, the proxy would use the @odata.type information to realize that a derived type was returned and would instantiatiate the corresponding derived C# type.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in the CSharp proxy's entity materialization path and inspect how responses are currently mapped to the base Entity Type. Follow the OData v4 @odata.type value to identify the corresponding derived C# type. Done means a response containing a derived type is instantiated as that derived type instead of the base type.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.