[2.0] Make OData configuration more magical
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 481
- Forks
- 136
- PR merge metrics
- No merged PRs in 30d
Description
When you set up a new OData endpoint, you typically have to register a bunch of settings to turn OData features on, like this:
endpoints.Select().Expand().Filter().OrderBy().MaxTop(100).Count().SetTimeZoneInfo(TimeZoneInfo.Utc);
But you can also register ODataValidationSettings to control some elements of that process, like this:
services.AddSingleton(new ODataValidationSettings
{
MaxTop = 5,
MaxAnyAllExpressionDepth = 3,
MaxExpansionDepth = 3,
});
OData does not check if these settings are in conflict, and it's not clear which settings will take priority.
Restier 2.0 should make it easier to control expansion depth without creating MaxTop conflicts. It should warn you if you hack the system to create conflicts anyway, and those warnings should be clear about what settings were applied in what order.
Should fix:
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
Begin with the endpoint-registration and ODataValidationSettings examples in this issue, then review issues #719, #684, and #558. Determine how Restier 2.0 should reconcile expansion-depth and MaxTop settings and define the precedence behavior. Done means conflicts are detected with clear warnings that identify which settings were applied and in what order.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100