nfroidure / whook

Build strong and efficient REST web services.
https://slides.com/nfroidure/introducing-whook
MIT License
31 stars 7 forks source link

Consider using URI template at the Whook's core #166

Open nfroidure opened 1 year ago

nfroidure commented 1 year ago

RFC https://www.rfc-editor.org/rfc/rfc6570

Implementation: https://www.npmjs.com/package/uri-template

nfroidure commented 3 weeks ago

Well, this is probably not a good idea since the API templates ain't deterministic for routers. For example, a template like /{foo}{bar} is valid but it is not possible to guest which part of anyuri map ti the foo and bar variables. The URI template spec was meant for serializing URL but not for creating viable routers (netiher perfy ones).