1.2.0 • Published 1 year ago

@luma-sys/decorators-api v1.2.0

Weekly downloads
-
License
UNLICENSED
Repository
-
Last release
1 year ago

Luma - API Decorators Module

API Decorators Module para projetos NestJS da Luma Systems.

Sumario

Instalação

npm i luma-api-decorators-module

Modo de uso

ISO8601 Date Validator

Retorna http status code 400 caso a data informada nao esteja no padrão ISO8601.

@IsDateISO8601()
date: Date;

Query required

Retorna http status code 400 caso não seja informado o query string anotado.

@HttpCode(200)
@Get()
async findAll(@QueryRequired('title') title: string) {}

Desenvolvimento

Teste

# unit tests
npm run test

# e2e tests
npm run test:e2e

# test coverage
npm run test:cov

Referências