mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 21:00:31 +00:00
feat: swagger document endpoints
This commit is contained in:
@@ -1,16 +1,37 @@
|
||||
import { IsEmail, IsNotEmpty } from 'class-validator';
|
||||
import { IsEmail, IsNotEmpty, IsString, IsNumber } from 'class-validator';
|
||||
import { ApiProperty, ApiExtraModels } from '@nestjs/swagger';
|
||||
|
||||
@ApiExtraModels()
|
||||
export class EditUserDto {
|
||||
@ApiProperty({
|
||||
description: 'First name of the user',
|
||||
example: 'John',
|
||||
})
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
firstName: string;
|
||||
|
||||
@ApiProperty({
|
||||
description: 'Last name of the user',
|
||||
example: 'Doe',
|
||||
})
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
lastName: string;
|
||||
|
||||
@ApiProperty({
|
||||
description: 'Email address of the user',
|
||||
example: 'john.doe@example.com',
|
||||
})
|
||||
@IsEmail()
|
||||
@IsNotEmpty()
|
||||
email: string;
|
||||
|
||||
@ApiProperty({
|
||||
description: 'Role ID assigned to the user',
|
||||
example: 2,
|
||||
})
|
||||
@IsNumber()
|
||||
@IsNotEmpty()
|
||||
roleId: number;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user