Closed tarekziade closed 7 years ago
I think the data should probably look like
{
"meta": {
"modelinfo": {
"person": {
"url": "...",
"primarykey": "..."
},
"article": {
"url": "...",
"primarykey": "...",
}
}
}
}
The keys in the modelinfo
object should be the collection_name(model)
, don't expose the table name. Similarly, use the primary_key_for(model)
helper function. This way, we respect the user's choices as specified in the APIManager.create_api()
call.
Thanks!
I have uploaded a working version of this in pull request #640 so I'm closing this one.
This is for #625
before I go further and add some tests in the PR, I would like to know where the data should land. I am unclear wether you want to split things around links/urls/relationships or have everything groups per model
Thanks