'nest+swagger apibody not displayed

I'm using nest and swagger and I have a question.

I wrote the code as below. But in swagger nothing render in request body.

Is it a picktype problem? Please tell me how to solve it.

thank you

 @ApiOperation({ summary: 'about payment' })
  @ApiBody({ type: PaymentDto })
  @ApiResponse({
    type: PaymentResponseDto,
  })
  @Patch('payment')
  async payment(
    @Body() paymentDto: PaymentDto,
)
export class PaymentDto extends PickType(Renewal, [
  'renewalMethod',
  'renewalPrice',
]) {}
@Entity()
export class Renewal{
  @ApiProperty({
    example: '9,900',
    description: 'price',
  })
  @IsNumber()
  @Column({ default: 0 })
  renewalPrice: number;

  @ApiProperty({
    example: 'subs',
    description: 'type',
  })
  @IsEnum(RenewalType)
  @Column({ type: 'enum', enum: RenewalType })
  renewalMethod: RenewalType;
}

result browser Image



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source