I'm not 100% sure this works in all cases, but exporting id as the empty string from a resource with only the singular actions, plus a bit of special-casing on that, and it seems to fall out.
Please take a look when you have a moment.
singular routes the easy way, with tests.
Added pluralization magic and amended existing tests,
I just merged a load of upstream changes, and some things broke. I don't have a lot of time to look for the problem, so if you are not going to use this approach to singular resources, maybe I should close this request. If you do want to use the code, I'll look into it further.
thought I had something similar already, I'll have to take a closer look