You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
Thank you for the suggestion, I will investigate how viable it is to implement this. I remember debating whether to add this as a feature or not, though forgot the reason why I didn't end up doing this.
Had a deeper look and while it is definitely possible it will require a rewrite in certain places. I will keep this issue open until I get around to adding this functionality.
Hi Benjamin,
when we send request like:
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 stringkey
like in other methods (CanSelect, CanFilter, CanOrder) which maps to our internal domain class likeCanExpand("RolesOfUser", x => x.UserRoles)
to hide our internal class name.Thanks,
Branislav
The text was updated successfully, but these errors were encountered: