`withNamespace` should support Higer Order nesting.
ppot opened this issue · comments
Philippe Potvin commented
let say:
const api = withNamespace('/v1')
const affiliate = withNamespace('/affiliate')
api(
affiliate(
post('/affiliation', affiliation)
get('/dashboard', dashboard)
)
)
instead of
const api = withNamespace('/v1')
api(
post('/affiliate/affiliation', affiliation)
get('/affiliate/dashboard', dashboard)
)
As of now with withNamespace
it's closely the same as :
router(
post('/v1/affiliate/affiliation', affiliation)
get('/v1/affiliate/dashboard', dashboard)
)
The other way around would be the possibility of nesting router by their namespaces.