File

src/instruments/dto/create-instrument.dto.ts

Index

Properties

Properties

Readonly Optional customMetadata
Type : Record<string | >
Decorators :
@ApiProperty({type: Object, required: false, default: undefined})
@IsOptional()
@IsObject()
Readonly name
Type : string
Decorators :
@ApiProperty({type: String, required: true})
@IsString()
Readonly uniqueName
Type : string
Decorators :
@ApiProperty({type: String, uniqueItems: true, required: true})
@IsString()
import { ApiProperty, ApiTags } from "@nestjs/swagger";
import { IsObject, IsOptional, IsString } from "class-validator";

@ApiTags("instruments")
export class CreateInstrumentDto {
  @ApiProperty({
    type: String,
    uniqueItems: true,
    required: true,
  })
  @IsString()
  readonly uniqueName: string;

  @ApiProperty({
    type: String,
    required: true,
  })
  @IsString()
  readonly name: string;

  @ApiProperty({
    type: Object,
    required: false,
    default: {},
  })
  @IsOptional()
  @IsObject()
  readonly customMetadata?: Record<string, unknown>;
}

results matching ""

    No results matching ""