Given a simple DTO
export class PersonDTO {
@IsInt()
@ApiProperty({
example: 1,
})
id: number;
@IsString()
@MaxLength(50)
@ApiProperty({
minLength: 2,
maxLength: 50,
example: 'Poppy',
})
name: string;
}
and then I create an creatDTO using OmitType
export class CreatePersonDTO extends OmitType(PersonDTO, [
'id',
] as const) {}
The newly created DTO is missing all it's ApiProperties information when looking in swagger, both example values and schema, am I doing something wrong?