- add optional description to scenario and environment entities - expose description in create/update DTOs, MCP tools, and export DTOs - render description as markdown on detail pages - add description editor (CodeEditor) to create/edit forms for both resources
37 lines
629 B
TypeScript
37 lines
629 B
TypeScript
import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
|
|
import {
|
|
IsIn,
|
|
IsNotEmpty,
|
|
IsObject,
|
|
IsOptional,
|
|
IsString,
|
|
IsUUID,
|
|
} from "class-validator";
|
|
import { EnvironmentData } from "../environment.entity";
|
|
|
|
export class EnvironmentExportDto {
|
|
@ApiPropertyOptional()
|
|
@IsOptional()
|
|
@IsIn(["environment"])
|
|
kind?: "environment";
|
|
|
|
@ApiPropertyOptional()
|
|
@IsOptional()
|
|
@IsUUID()
|
|
id?: string;
|
|
|
|
@ApiProperty()
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
name: string;
|
|
|
|
@ApiPropertyOptional()
|
|
@IsOptional()
|
|
@IsString()
|
|
description?: string;
|
|
|
|
@ApiProperty()
|
|
@IsObject()
|
|
data: EnvironmentData;
|
|
}
|