microsoft / microsoft/Vipr

Support Property Default Values

Open
#30 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

core model representation enhancement help wanted question tracked up-for-grabs
Dominant language
C#
Stars
111
Forks
50
PR merge metrics
No merged PRs in 30d

Description

Default Values

Non-nullable properties that are not set on the client during object creation will typically have their values defaulted on the server and then sent back on subsequent requests. When properties do have default values they should be expressed in the client-side model. This allows for minimizing bits on the wire [values that are default need not be sent] and improves developer experiences [inspecting a 'new' object instance is representative on the server's projection of that object].

OData v4 Description

Property Default Value

Model description

The default values will be represented on the OdcmProperty type. Consider making OdcmProperty generic so that readers can be responsible for parsing the value and store it in a strongly-typed DefaultValue property.

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 by reading the OdcmProperty type and the linked OData v4 Property Default Value description. Determine how default values should be represented in the model, including whether OdcmProperty needs to become generic and how readers would parse values. Done means the model can retain strongly typed property defaults for client-side object creation and request minimization.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.