Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 13 additions & 10 deletions src/did/dto/create-did.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,17 @@ export class Options {
@IsBoolean()
register?: boolean = false; // keeping it for time being will remove it later

// @ApiProperty({
// description:
// 'verificationRelationships defines verification methods to be used for which purposes',
// example: 'authentication/ assertionMethod',
// name: 'verificationRelationships',
// required: false,
// isArray: true,
// })
// @IsOptional()
@ApiProperty({
name: 'namespace',
description: 'Namespace to be added in did. Omit to default to mainnet.',
example: 'mainnet',
required: false,
})
@IsOptional()
@IsEnum(Namespace, {
message: "namespace must be one of the following values: 'testnet', 'mainnet'",
})
namespace?: Namespace = Namespace.mainnet;
// @IsArray()
// @IsEnum(IVerificationRelationships, { each: true })
// verificationRelationships?: IVerificationRelationships[];
Expand All @@ -100,10 +102,11 @@ export class CreateDidDto {
description: 'Namespace to be added in did.',
example: 'testnet',
})
@IsOptional()
@IsEnum(Namespace, {
message: "namespace must be one of the following values: 'testnet', '' ",
})
namespace: Namespace;
namespace?: Namespace;

@ApiProperty({
name: 'methodSpecificId',
Expand Down
7 changes: 5 additions & 2 deletions src/presentation/dto/create-presentation-request.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,10 @@ export class CreatePresentationDto {
example: 'example.com',
})
@IsNotEmpty()
@IsUrl()
@IsUrl({
require_tld: false,
require_protocol: true,
})
domain: string;
@ApiProperty({
name: 'verificationMethodId',
Expand Down Expand Up @@ -195,7 +198,7 @@ class PresentationProof {
})
@IsString()
created: Date;

@ApiProperty({
name: 'verificationMethod',
description: 'Verification id using which credential has signed',
Expand Down
Loading