Skip to content
Snippets Groups Projects
Commit cc6f2a97 authored by Boyan Tsolov's avatar Boyan Tsolov
Browse files

fix: added checks on dtos

parent 5d300055
No related branches found
No related tags found
1 merge request!44Preparations for ui
Pipeline #66519 waiting for manual action with stages
in 21 minutes and 34 seconds
import { IsDateString, IsNotEmpty, IsString } from "class-validator";
import { BaseRecordDto } from "./base.record.dto";
// INFO: should cover:
// 1. get connection response
// 2. accept connection response
export class ConnectionRecordDto extends BaseRecordDto {
@IsNotEmpty()
......
......@@ -2,12 +2,6 @@ import { IsNotEmpty, IsString } from "class-validator";
import { BaseRecordDto } from "./base.record.dto";
// INFO: should cover:
// 1. get credential definition response
// 2. create credential definition response
export class CreddefRecordDto extends BaseRecordDto {
@IsNotEmpty()
......
import {
IsArray,
IsDateString,
IsNotEmpty,
IsString,
ValidateNested,
......@@ -10,29 +9,7 @@ import { IssueCredentialAttributes } from "../requests/issue.credential.request.
import { BaseRecordDto } from "./base.record.dto";
// INFO: should cover:
// 1. create credential response
// 2. get credential response
// export class Credential extends BaseRecordDto {
// @IsNotEmpty()
// @IsString()
// credentialRecordType: string;
// @IsNotEmpty()
// @IsString()
// credentialRecordId: string;
// }
export class CredentialRecordDto extends BaseRecordDto {
// @IsArray()
// @ValidateNested({ each: true })
// @Type(() => Credential)
// credentials?: Array<Credential>;
@IsNotEmpty()
@IsString()
credentialRecordType: string;
......
......@@ -6,12 +6,6 @@ import {
import { BaseRecordDto } from "./base.record.dto";
// INFO: should cover:
// 1. decline proof response
// 2. get proof response
// 3. issue proof response
export class ProofRecordDto extends BaseRecordDto {
@IsString()
connectionId?: string;
......
import { IsDateString, IsNotEmpty, IsString } from "class-validator";
import { ArrayMinSize, IsArray, IsNotEmpty, IsString } from "class-validator";
import { BaseRecordDto } from "./base.record.dto";
// INFO: should cover:
// 1. create schema response
// 2. get schema response
export class SchemaRecordDto extends BaseRecordDto {
@IsString()
@IsNotEmpty()
name: string;
@IsNotEmpty()
@IsArray()
@IsString({ each: true })
@ArrayMinSize(1)
attributes: string[];
@IsNotEmpty()
......
import { IsNotEmpty, IsString } from "class-validator";
// INFO: should cover:
// 1. get connection request
export class ConnectionReqDto {
//@example 6464b521-005a-4379-91e0-a3692b31cafd
@IsNotEmpty()
......
import { IsNotEmpty, IsString } from "class-validator";
// INFO: should cover:
// 1. get credential definition request
export class CreddefReqDto {
@IsNotEmpty()
......
import { IsNotEmpty, IsString } from "class-validator";
// INFO: should cover:
// 1. accept credential request
// 2. get credential request
export class CredentialReqDto {
//@example cf8395a5-9a53-4e06-8a5d-04e0fc00ca04
@IsNotEmpty()
......
import { IsNotEmpty, IsString, ValidateIf } from "class-validator";
// INFO: should cover:
// 1. get proof request
// 2. decline proof request
// 3. accept proof request
export class ProofReqDto {
@IsString()
@IsNotEmpty()
......
import { IsNotEmpty, IsString } from "class-validator";
// INFO: should cover:
// 1. get schema request
export class SchemaReqDto {
//@example "did:indy:LEDNGER:SXM76gQwRnjkgoz2oBnGjd/anoncreds/v0/SCHEMA/test schema/1.0.2"
@IsNotEmpty()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment