- Issue created by @catch
I saw this issue in Slack and had a vague recollection of being the culprit for this routing approach. So I dug up this issue from when JSON:API was in contrib: https://www.drupal.org/project/jsonapi/issues/2953346 →
There's some nuance, the routes aren't per-field, they're per relationship field, i.e., basically per entity reference field (with some exceptions).
The trade-off is that when the field name is a param, all the logic for whether the field is a relationship, whether it supports the request method, and whether it's a file field happens at request time.
Back then, that process was a source of instability and it was preferable to have those bugs surface during a router rebuild rather than "in the field".
Now, a lot of that logic lives in the resource type repository so it might not be computed on every request any more. I can't recall if we're caching those results.
To be clear, I'm not saying this is a bad idea, I'm just adding that historical context so that we don't introduce a regression—tearing down Chesterton's fence so to speak.