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