Skip to content

Issue: 'expand' query parameter exposes internal domain class names #12

@bpkinez

Description

@bpkinez

Hi Benjamin,

when we send request like:

GET /api/Users
?filter=        Age>=20, Name$*Smith|Bullock
&orderby=       -Age, Name
&select=        Id, Name, Age
&expand=        UserRoles
&pageNumber=    1
&pageSize=      10

we expose our internal domain class name (navigation property) UserRoles to end users and I think it violates some of the REST API recommendation which suggests that we should hide our domain classes.

Accordingly, it would be good in CanExpand method that we could set string key like in other methods (CanSelect, CanFilter, CanOrder) which maps to our internal domain class like CanExpand("RolesOfUser", x => x.UserRoles) to hide our internal class name.

Thanks,
Branislav

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions