express-list-endpoints icon indicating copy to clipboard operation
express-list-endpoints copied to clipboard

Feature Request : Route title and description.

Open cybercoder opened this issue 6 years ago • 4 comments

As i use this awesome library to create an ACL module in combination with path-to-regexp, I can list and show route based permissions. So if we can add something like this :

   router
          .get('/posts',(req,res)=>{
                  req.title = 'Get Posts' ;
                 req.description = 'get a paginated list of posts and ...' ;
                 ...  
          })

It will be more awesome.

cybercoder avatar Apr 11 '19 12:04 cybercoder

Mmmh, not sure if this would be possible. Will take a look.

Thanks for the request!

AlbertoFdzM avatar Apr 30 '19 08:04 AlbertoFdzM

This would be amazing

EdByrnee avatar Jan 27 '20 12:01 EdByrnee

A meta tag would be better

req.locals.ele_meta = {
 title: "Title here",
 description: "here"
}

EdByrnee avatar Jan 28 '20 18:01 EdByrnee

Hi!, sorry for my delay in response.

Thanks for the issue. I did look into this but the tool is unable to retrieve any information contained inside the middleware/requestHandler logic. Also, for those values to get to be set it would need the endpoint to be called.

You could do something like this https://runkit.com/albertofdzm/express-list-endpoints-issue-42

But IMHO that's not the scope for this project since it uses data models unknown by the Express API.

AlbertoFdzM avatar Jul 29 '21 17:07 AlbertoFdzM