Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request : Route title and description. #42

Open
cybercoder opened this issue Apr 11, 2019 · 4 comments
Open

Feature Request : Route title and description. #42

cybercoder opened this issue Apr 11, 2019 · 4 comments
Assignees

Comments

@cybercoder
Copy link

cybercoder commented Apr 11, 2019

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.

@AlbertoFdzM
Copy link
Owner

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

Thanks for the request!

@EdByrnee
Copy link

This would be amazing

@EdByrnee
Copy link

EdByrnee commented Jan 28, 2020

A meta tag would be better

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

@AlbertoFdzM
Copy link
Owner

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 AlbertoFdzM self-assigned this Jul 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants