Skip to content
Discussion options

You must be logged in to vote

Hello @linde12 .

Thank you for your feedback. I am happy to answer your questions in order.

I can't find any documentation on how you access & validate express route path values. E.g. express.get('/users/:id', ...) - how do i set a schema for id and access its value?

You can find the complete answer here: #73
Basically you should do this:

const myRouting: Routing = {
  users: {
    ':id': myEndpoint // <— connected to /users/:id 
  }
};

And in order to obtain the value of :id you need a paramsProviderMiddleware. You will find an example at the link mentioned above.

I can't find any documentation on how you work with array outputs [1]

Shortly: you should pass the array to an object pro…

Replies: 7 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by RobinTail
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
2 participants
Converted from issue

This discussion was converted from issue #158 on October 14, 2021 21:03.