Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2.0] Make OData configuration more magical #751

Open
robertmclaws opened this issue Dec 5, 2023 · 0 comments
Open

[2.0] Make OData configuration more magical #751

robertmclaws opened this issue Dec 5, 2023 · 0 comments
Milestone

Comments

@robertmclaws
Copy link
Collaborator

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:

@robertmclaws robertmclaws added this to the 2.0 milestone Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

1 participant