OData / OData/RESTier

[2.0] Make OData configuration more magical

Open
#751 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug feature
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

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.