Skip to content

[2.0] Make OData configuration more magical #751

@robertmclaws

Description

@robertmclaws

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:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions