You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently expressjs supports requests with multiple parameters as shown:
In the endpoint below we are passing an id and id2 as parameters http://localhost:3000/users/1/2
In the express.Request you can see the object that lists all these parameters as such: { id: '1', id2: '2' }
We need to modify the @param decorator to support multiple parameters. Also, we need to investigate the possibility to validate the types passed in the parameter.
The initial idea would be to use the types inferred by the parameter name to either automatically convert to the type suggested.
Description
Currently
expressjs
supports requests with multiple parameters as shown:In the endpoint below we are passing an id and id2 as parameters
http://localhost:3000/users/1/2
In the
express.Request
you can see the object that lists all these parameters as such:{ id: '1', id2: '2' }
We need to modify the
@param
decorator to support multiple parameters. Also, we need to investigate the possibility to validate the types passed in the parameter.The initial idea would be to use the types inferred by the parameter name to either automatically convert to the type suggested.
As the code above shows, the id would take the property
id
name and convert by its type, in this casenumber
Requirement
The text was updated successfully, but these errors were encountered: