Open nfroidure opened 1 year 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).
RFC https://www.rfc-editor.org/rfc/rfc6570
Implementation: https://www.npmjs.com/package/uri-template