How to declare collection of non-nullable references?
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 22
- Forks
- 24
- PR merge metrics
- No merged PRs in 30d
Description
I use conventional builder to make my model.
Somewhere I have this definition:
[DataMember]
public string[]? Codecs { get; set; }
And in metadata it looks like this:
<Property Name="Codecs" Type="Collection(Edm.String)"/>
Which is from my understanding a nullable collection of nullable strings.
I do understand that from a code point of view string is a nullable reference type.
But is there a way to declare that this specific collection contains non-nullable strings?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the CLR Codecs declaration and compare it with the generated Edm.Collection metadata shown in the issue. Trace how the conventional builder determines collection and element nullability, then verify whether a supported declaration can express non-nullable elements. Done means the metadata reflects the intended element nullability or the limitation is clearly documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api, backend-api-design
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100