import { ApiProperty } from "@nestjs/swagger"; import { IsNotEmpty, IsString, Length } from "class-validator"; export class CreatePostDto { @ApiProperty({ example: "Заголовок" }) @IsString() @Length(1, 200) title: string; @ApiProperty({ example: "Краткое описание" }) @IsString() @Length(1, 400) shortDescription: string; @ApiProperty({ example: "Полное описание..." }) @IsString() @IsNotEmpty() fullDescription: string; }