Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
register-schema.dto.ts 525 B
import { ApiProperty } from '@nestjs/swagger';
import { IsArray, IsNotEmpty, IsSemVer, IsString } from 'class-validator';

export class RegisterSchemaPayload {
  @IsString()
  @IsNotEmpty()
  @ApiProperty()
  public issuerDid: string;

  @IsString()
  @IsNotEmpty()
  @ApiProperty()
  public name: string;

  @IsString()
  @IsNotEmpty()
  @IsSemVer()
  @ApiProperty()
  public version: string;

  @IsArray()
  @IsString({ each: true })
  @IsNotEmpty({ each: true })
  @ApiProperty()
  public attributeNames: Array<string>;
}