I'm designing an API using Hypermedia concepts. I saw that is a good practice have a root route that returns the others API links to navigate.
Ex.: I made a request to http://myapi.com and it returns
{
links: [
{ 'rel': 'profile', href: '/profile' },
{ 'rel': 'orders', href: '/orders' },
{ 'rel': 'order_types', href: '/order_types' },
...
]
}
But, in this way, if the root had 20 resources it will be very large.
So, made a direct request to order_types instead request root and then request the order_types is a anti pattern?