Wizcorp/express-rested

API is case sensitive

Opened this issue · 4 comments

This is counter to common practice.
api/rest/mediaProfiles/ and api/rest/mediaprofiles/
Should be aliases of each other, not separate endpoints.

We accidentally ran into this today. I couldn't figure out how fix this at a glance, so I didn't. The discussion here at least confirms it should be insensitive, but it's not really a big deal.

IMHO it should be case sensitive. But iirc Express defaults to case insensitivity. I guess we should follow Express settings?

Since it uses express' router, I think using those settings would be the expected behaviour. We ourselves always use lowercase paths anyway so should not hit this outside of testing.

Wanna PR this? :)

Halfway there :) Can't allocate too much time currently