Not sure if the title is descriptive but here's my problem. Given paths with optional parameters for example:
/client/get
/admin/client/get
/admin/client/get/2
How could I generate a template that express every possible version of this url. For the example it would be something like:
/{admin}/client/get/{id}
My main issue being keeping the order of the path. While I am able to generate a path with all arguments, I can't seem to do it in the right order. Resulting in templates like:
/client/get/{id}/{admin}
I have all paths in a python list as strings with no particular order like so:
/client/get
/admin/client/get/<int:id>
/admin/client/get