feat: document more endpoints

This commit is contained in:
Ahmed Bouhuolia
2025-06-16 23:40:12 +02:00
parent e057b4e2f0
commit f624cf7ae6
8 changed files with 629 additions and 5 deletions

View File

@@ -0,0 +1,33 @@
import { ApiProperty } from '@nestjs/swagger';
class Pagination {
@ApiProperty({
description: 'Total number of items across all pages',
example: 100,
})
total: number;
@ApiProperty({
description: 'Current page number (1-based)',
example: 1,
minimum: 1,
})
page: number;
@ApiProperty({
description: 'Number of items per page',
example: 10,
minimum: 1,
})
pageSize: number;
}
export class PaginatedResponseDto<TData> {
@ApiProperty({
description: 'Pagination metadata',
type: Pagination,
})
pagination: Pagination;
data: TData[];
}