feat: add login swagger fields
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { IsNotEmpty, IsString } from 'class-validator';
|
||||
import { PhoneDTO } from './login.dto';
|
||||
import { i18nValidationMessage as t } from 'nestjs-i18n';
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
|
||||
export class VerifyOtpDTO extends PhoneDTO {
|
||||
@IsString()
|
||||
@@ -9,5 +10,11 @@ export class VerifyOtpDTO extends PhoneDTO {
|
||||
field: '$t(auth.fields.otp)',
|
||||
}),
|
||||
})
|
||||
@ApiProperty({
|
||||
type: 'string',
|
||||
description: '5-digit OTP code',
|
||||
example: '12345',
|
||||
required: true,
|
||||
})
|
||||
otp!: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user