Skip to content

Validate params and query params using Nestjs built-in pipes. #58

@manekenpix

Description

@manekenpix

Using these built-in pipes, it's possible to validate params and query params:

@Get(':id')
async getById(@Param('id', new ParseUUIDPipe({ version: '4' })) id: number) {
  return this.myService.getById(id);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiAPI related issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions