Hacker News new | ask | show | jobs
by felixfbecker 2783 days ago
The fact that OData calls itself not only RESTful, but literally "the best way to REST", while using requests like this:

    GET serviceRoot/People('russellwhyte')/Microsoft.OData.SampleService.Models.TripPin.GetFavoriteAirline()
is an absolute insult to REST and the target developer audience.

https://www.odata.org/getting-started/basic-tutorial/#bounde...

2 comments

I think this is a bit cherrypicked. The example you're using is a fully qualified bound function. OData support for actions and functions explicitly exist to provide affordances for how to do RPC within OData. You can easily model this API in OData without requiring a function (eg. having a navigation property reference called "favoriteAirline"). Moreover, you can typically invoke functions without a fully qualified prefix (save cases where there is ambiguity).

For the most part, OData does a good job at letting folks opt into complexity, allowing integrators to make full use of APIs without needing to know anything about $metadata, inheritance mechanics, functions, etc.

Semantic URL routing isn’t part of REST.