[Question] Is it possible to add support for a custom value type?
Open
@xuzhg is already working on this.
Since Oct 27, 2022.
feature
P2
- Dominant language
- C#
- Stars
- 505
- Forks
- 186
- PR merge metrics
- No merged PRs in 30d
Description
Suppose I have a custom type that abstracts some concept in a higher level of abstraction than a primitive type does (string, int, etc). I could think of a few such types:
DateTime,DateTimeOffset: natively supported (Edm.DateTimeOffsetfor ex)TimeSpan: natively supported asEdm.DurationUri: not natively supported in OData (gets mapped as a custom complex type)- a
Temperatureclass, which accepts strings of the form15°Cor50°F - a
Distanceclass, like5mor10ft - so on and so forth
Additionally, some types had support added later, like Spatial types.
What does one need to do to make these custom types available as if they were native constructs in an OData API?
- How to make them serialize/deserialize into their corresponding string/number representations?
- How to make them appear as a custom EDM type in the API's metadata?
- How to allow them to be used in queries and filters?
I have not found any documentation around this whatsoever, so I'm asking the owners to see if there is any extension point and how they work.
Contributor guide
No contributing guide indexed for this repository
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.
Assessment
This issue has not been assessed yet.