src/issuer/credentials-metadata/dto/schema-response.dto.ts
Schema to validate other json objects.
Properties |
|
| $schema |
Type : unknown
|
Decorators :
@Equals('https://json-schema.org/draft/2020-12/schema')
|
| Optional description |
Type : string
|
Decorators :
@IsOptional()
|
| properties |
Type : Record<string | any>
|
Decorators :
@IsObject()
|
| Optional required |
Type : string[]
|
Decorators :
@IsArray()
|
| Optional title |
Type : string
|
Decorators :
@IsOptional()
|
| type |
Type : unknown
|
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;
}