some-dto.ts
export class CreateCatDto {
@ApiProperty()
name: string;
@ApiProperty()
age: number;
@ApiProperty()
breed: string;
}
I don't want response something like this:
@ApiOkResponse(
description: 'Cat object',
type: CreateCatDto
)
but my response must be array of like dto objects. I want smth like soo
ApiOkResponse(
description: 'The record has been successfully removed.',
schema: {
type: 'array',
properties: {
obj: {
type: CreateCatDto
}
}
}
)
have you tried something like this:
@ApiOkResponse(
description: 'Cat object',
type: CreateCatDto,
isArray: true // <= diff is here
)
Let me know if it helps