annoted dtos for swagger
This commit is contained in:
parent
fdf0efd17f
commit
a92c4bec1f
7 changed files with 37 additions and 7 deletions
|
|
@ -1,3 +1,8 @@
|
||||||
|
import { ApiProperty } from '@nestjs/swagger';
|
||||||
|
|
||||||
export class CreateCategoryDto {
|
export class CreateCategoryDto {
|
||||||
|
@ApiProperty({
|
||||||
|
description: 'Category for expenses'
|
||||||
|
})
|
||||||
name: string;
|
name: string;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,9 @@
|
||||||
export class UpdateCategoryDto {
|
import { ApiProperty } from '@nestjs/swagger';
|
||||||
|
import { CreateCategoryDto } from './create-category.dto';
|
||||||
|
|
||||||
|
export class UpdateCategoryDto extends CreateCategoryDto {
|
||||||
|
@ApiProperty({
|
||||||
|
description: 'Unique ID of the category'
|
||||||
|
})
|
||||||
id: string;
|
id: string;
|
||||||
name: string;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import { ApiProperty } from '@nestjs/swagger';
|
||||||
|
|
||||||
export class UpdateExpenseDto extends CreateExpenseDto {
|
export class UpdateExpenseDto extends CreateExpenseDto {
|
||||||
@ApiProperty({
|
@ApiProperty({
|
||||||
description: 'UUID of the expense'
|
description: 'Unique ID of the expense'
|
||||||
})
|
})
|
||||||
id: string;
|
id: string;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
import { ApiProperty } from '@nestjs/swagger';
|
||||||
|
|
||||||
export class CreateMerchantDto {
|
export class CreateMerchantDto {
|
||||||
|
@ApiProperty({
|
||||||
|
description: 'Merchant name'
|
||||||
|
})
|
||||||
name: string;
|
name: string;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,9 @@
|
||||||
export class UpdateMerchantDto {
|
import { CreateMerchantDto } from './create-merchant.dto';
|
||||||
|
import { ApiProperty } from '@nestjs/swagger';
|
||||||
|
|
||||||
|
export class UpdateMerchantDto extends CreateMerchantDto {
|
||||||
|
@ApiProperty({
|
||||||
|
description: 'Unique ID of merchant'
|
||||||
|
})
|
||||||
id: string;
|
id: string;
|
||||||
name: string;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
import { ApiProperty } from '@nestjs/swagger';
|
||||||
|
|
||||||
export class CreateTagDto {
|
export class CreateTagDto {
|
||||||
|
@ApiProperty({
|
||||||
|
description: 'Tag for expenses'
|
||||||
|
})
|
||||||
name: string;
|
name: string;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,9 @@
|
||||||
export class UpdateTagDto {
|
import { CreateTagDto } from './create-tag.dto';
|
||||||
|
import { ApiProperty } from '@nestjs/swagger';
|
||||||
|
|
||||||
|
export class UpdateTagDto extends CreateTagDto {
|
||||||
|
@ApiProperty({
|
||||||
|
description: 'Unique ID of tag'
|
||||||
|
})
|
||||||
id: string;
|
id: string;
|
||||||
name: string;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue