import { ApiProperty } from '@nestjs/swagger'; import { IsArray, ValidateNested } from 'class-validator'; import { Type } from 'class-transformer'; import { LeagueMemberDTO } from './LeagueMemberDTO'; export class LeagueMembershipsDTO { @ApiProperty({ type: [LeagueMemberDTO] }) @IsArray() @ValidateNested({ each: true }) @Type(() => LeagueMemberDTO) members: LeagueMemberDTO[]; }