src/common/dto/request/slug-param.dto.ts
Data Transfer Object for fetching an entity by its slug. This DTO is used to validate the request parameters when fetching an entity by its slug.
Properties |
| slug |
Type : string
|
Decorators :
@ApiProperty({description: 'Slug of the entity to be fetched', name: 'slug', type: 'string', required: true})
|
|
Defined in src/common/dto/request/slug-param.dto.ts:20
|
|
Slug of the entity to be fetched |
import { ApiProperty } from '@nestjs/swagger';
import { IsString } from 'class-validator';
/**
* Data Transfer Object for fetching an entity by its slug.
* This DTO is used to validate the request parameters when fetching an entity by its slug.
*/
export class GetBySlugParamDto {
/**
* Slug of the entity to be fetched
* @type {string}
*/
@ApiProperty({
description: 'Slug of the entity to be fetched',
name: 'slug',
type: 'string',
required: true,
})
@IsString()
slug: string;
}