In the end we need something that will let a repository admin browse and manage the tree created by the ldp:contains relationship. I'm trying to keep this pattern as drupal-y as possible. I'm thinking something like
I'm assuming all of these will be provided as links on the annotation. Thoughts?
So it turns out that REST, Views, and Entity routes all kind of stomp all over each other. It's pretty easy to do stuff leads to inconsistencies in route matching. Trying to take a route, like /fedora_resource/{id}, and then adding a view for it at '/fedora_resource/{id}/children' makes Drupal just pick one of the two. It can't sort them out.
So what I was thinking of won't work. A patch has been put into 8.3 to handle this, but until then, maybe we should sandbox REST, entity, and views routes in different contexts. And I wouldn't guarantee that 8.3 will fix all the wonkiness of the interplay between all those systems.
These should be separate enough, but I have to go through it to know for sure.
I'm updating to 8.3 dev to see if that fixes the REST/Views interplay issue.
8.3 still has issues. If I make a View with both a page and a rest export, the REST export trumps the page. The _format parameter is not respected, even when forced to 'html'. I'm looking into workarounds, but it's looking like REST and Views are not going to work for us if we want our html routes and REST routes to be the same, since content negotiation is a total fail.
After the committers call on Nov. 9th, there was enough discussion to warrant moving forward using the underlying symfony componentry and avoiding views/rest exports. This would not prevent others from implementing views, but the core API GET requests would not use them.
So here's the api I _want_. I'm sticking with /islandora/object as the main context to the api as homage to current stack, but I'm flexible on that naming.
I think it pretty clearly makes a distinction between what I would consider 'core' and 'pcdm' functionality. Athough I'm not designating it in the route. That should also be discussed.
Hopefully by moving forward using the Symfony componentry I can actually implement this without random Drupal issue X blocking my path.
We should have shortcuts to common file types, instead of needing to provide ids or go through the files list to find them. Basically just using the old DSIDs here.
Feedback would be nice.
I'm going to try and flesh this out a little more with actual expected responses and formats. Please feel free to add any comments in the meantime. If you think anything doesn't need to be there, or if I'm missing something, please let me know.
Closing. I'm tired of designing in a vacuum on this one, and we can't even seem to get past basic CRUD without getting derailed.
We'll do just enough for MVP to get by and revisit this in earnest at a later date with more community involvement.
Most helpful comment
After the committers call on Nov. 9th, there was enough discussion to warrant moving forward using the underlying symfony componentry and avoiding views/rest exports. This would not prevent others from implementing views, but the core API GET requests would not use them.