File

src/issuer/credentials-metadata/dto/schema-response.dto.ts

Description

Schema to validate other json objects.

Index

Properties

Properties

$schema
Decorators :
@Equals('https://json-schema.org/draft/2020-12/schema')
Optional description
Type : string
Decorators :
@IsOptional()
@IsString()
properties
Type : Record<string | any>
Decorators :
@IsObject()
Optional required
Type : string[]
Decorators :
@IsArray()
Optional title
Type : string
Decorators :
@IsOptional()
@IsString()
type
Decorators :
@Equals('object')
import {
    Equals,
    IsArray,
    IsObject,
    IsOptional,
    IsString,
} from "class-validator";

/**
 * Schema to validate other json objects.
 */
export class SchemaResponse {
    @Equals("https://json-schema.org/draft/2020-12/schema")
    $schema: "https://json-schema.org/draft/2020-12/schema";
    @Equals("object")
    type: "object";
    @IsObject()
    properties: Record<string, any>;
    @IsArray()
    required?: string[];
    @IsOptional()
    @IsString()
    title?: string;
    @IsOptional()
    @IsString()
    description?: string;
}

results matching ""

    No results matching ""