import { IsArray, ValidateNested } from 'class-validator'; import { ApiProperty } from '@nestjs/swagger'; import { Type } from 'class-transformer'; import { OrderPrintValueDto } from './order-print-value.dto'; export class CreateOrderPrintDto { @ApiProperty({ type: [OrderPrintValueDto], example: [{ fieldId: '', value: '' }], }) @IsArray() @ValidateNested({ each: true }) @Type(() => OrderPrintValueDto) fields: OrderPrintValueDto[]; }