import { IsString, IsNotEmpty, IsIn, IsOptional, IsUUID } from 'class-validator'; import { ApiType } from '@datacat/shared'; export class CreateApiEntryDto { @IsString() @IsNotEmpty() title!: string; @IsString() @IsNotEmpty() version!: string; @IsString() @IsOptional() description?: string; @IsIn(['ASYNCAPI', 'OPENAPI']) type!: ApiType; @IsString() @IsNotEmpty() yamlContent!: string; @IsUUID() @IsOptional() categoryId?: string; @IsString() @IsOptional() functionalDoc?: string; @IsString() @IsOptional() technicalDoc?: string; @IsString() @IsOptional() externalDocUrl?: string; @IsString() @IsOptional() contactFunctional?: string; @IsString() @IsOptional() contactTechnical?: string; @IsString() @IsOptional() accessRights?: string; }