But when I get them using @QueryParam or @PathParam they have the right type which is number, why is that happening? I like the idea of having decorators for getting specific parameters, but it would be nice to have one like @Query, that would return the object received on the query from express, I may have too many arguments on the query, and it's not pretty to get each of them using @QueryParam.
Example of request that generate this:http://localhost/person/123?id=321
When accessing the data directly from the ContextRequest, it is returning me a json with the wrong data types, example:
But when I get them using
@QueryParam
or@PathParam
they have the right type which isnumber
, why is that happening? I like the idea of having decorators for getting specific parameters, but it would be nice to have one like@Query
, that would return the object received on the query from express, I may have too many arguments on the query, and it's not pretty to get each of them using@QueryParam
.Example of request that generate this:
http://localhost/person/123?id=321
Version used: 3.0.2