EDIT: found a solution thanks to the comment suggesting to use a DTO. Answer detailed at the bottom.
The NestJS website has documentation to [declare default values][1] when using @ApiBody(), is there a way to do so with @ApiQuery()? (i.e. show in the documentation that the queries have default values)
for example, if I have pagination queries and want the default to be page 1 with 5 entries per page:
@Get()
@ApiQuery({name: 'page', default: 1, type: Number})
@ApiQuery({name: 'limit', default: 5, type: Number})
async getDocuments(
@Query('page') page: Number = 1,
@Query('limit') limit: Number = 5
){
return this.documentsService.getDocuments(page, limit);
}