Nested Resources
The API that I am integrating with has a lot of nested resources. As an example (i.e not actual api url):
GET/POST/PATCH/DELETE https://api.com/v1/resourceA
GET/POST/PATCH/DELETE https://api.com/v1/resourceA/resourceAName/resourceB
GET/POST/PATCH/DELETE https://api.com/v1/resourceA/resourceAName/resourceB/resourceBName/resourceC
What is the best practice way of setting up the data provider for such an API? Should I create a custom data provider for https://api.com/v1, pass in resourceAName as an id, and resourceBName/resourceCName/etc. as metadata? Or should I create separate custom data providers for each resource? Both of these seem a bit convoluted for a use case that seems like it would be common place, so I assume there must be a better way to do this.
Thank you!
GET/POST/PATCH/DELETE https://api.com/v1/resourceA
GET/POST/PATCH/DELETE https://api.com/v1/resourceA/resourceAName/resourceB
GET/POST/PATCH/DELETE https://api.com/v1/resourceA/resourceAName/resourceB/resourceBName/resourceC
What is the best practice way of setting up the data provider for such an API? Should I create a custom data provider for https://api.com/v1, pass in resourceAName as an id, and resourceBName/resourceCName/etc. as metadata? Or should I create separate custom data providers for each resource? Both of these seem a bit convoluted for a use case that seems like it would be common place, so I assume there must be a better way to do this.
Thank you!
