I'm just curious, how would you surface the ability to create nested items in an API? Say you have a model
I have my base routes for both Post and Observations, but in thinking about a client using the API, they'd probably need the UI to have the post form and observation forms in the same view since observations are directly tied to posts. One problem is that when you're adding a post, it's new so we can't just create an observation by sending a POST to
/api/v1/observations because we don't have a
post_id to assign to yet. I suppose someone making the client (my future self) could force the creation of a post before adding observations to it, but that feels more like a limitation than anything.