refactor: api validators (boolean and date) (#7709)

* refactor: api validators (boolean and date)

* chore: open api

* revert: time bucket change
This commit is contained in:
Jason Rasmussen
2024-03-07 22:59:02 -05:00
committed by GitHub
parent 753842745d
commit a50f125dd1
41 changed files with 276 additions and 368 deletions
+3 -4
View File
@@ -1,14 +1,13 @@
import { AssetPathType, EntityType, PathType, PersonPathType, UserPathType } from '@app/infra/entities';
import { ApiProperty } from '@nestjs/swagger';
import { Type } from 'class-transformer';
import { IsArray, IsDate, IsEnum, IsString, IsUUID, ValidateNested } from 'class-validator';
import { Optional, ValidateUUID } from '../domain.util';
import { IsArray, IsEnum, IsString, IsUUID, ValidateNested } from 'class-validator';
import { Optional, ValidateDate, ValidateUUID } from '../domain.util';
const PathEnum = Object.values({ ...AssetPathType, ...PersonPathType, ...UserPathType });
export class AuditDeletesDto {
@IsDate()
@Type(() => Date)
@ValidateDate()
after!: Date;
@ApiProperty({ enum: EntityType, enumName: 'EntityType' })