Fix naming collisions in Schema Generation by carltongibson · Pull Request #5464 · encode/django-rest-framework (original) (raw)
Okay, so the easiest way to review this would be to comment out in this ticket what the simplest example of a schema collision is. In the shown case, do we have two different links that are both supposed to be included as this?...
If so, what would we expect the schema structure to look like instead?
I suppose we could do something like fall back to...
{
"retrieve": Link()
"test_retrieve": Link()
}
Tho it's not obvious how we'd make that work reliably.
Alternatively, could we raise a clear exception explaining what the issue is, and document this as a constraint? (allow the user to either renamed the URL or customize the structure generation?)