1 thought on “need orginal path to generate api docs

  1. @GuskiS, so that I am clear what you mean, you want to log the parameterized route (ex: /user/:id) along with your application logs so that you can trace logs together for which route triggered that code path?

    If so, then I can see that this might be a more “general purpose” feature than specifically the “generate docs” use case. Depending on how you structure your app/routes you can get some unexpected results from req.route, but still seems like a reasonable ask.

    All of this has made me take a look at what I did in the open api module, and it would actually simplify some code I wrote there if we did add some reference to the original “route” before path-to-regexp parses it.

    That all said, I think if we want to move forward with this idea we should move the conversation over to the router repo.

Comments are closed.