forked from credebl/platform
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request credebl#682 from credebl/fix/dto-validations
- Loading branch information
Showing
2 changed files
with
18 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
import { ApiProperty } from '@nestjs/swagger'; | ||
import { IsArray, IsString, IsNotEmpty, IsObject} from 'class-validator'; | ||
import { IsArray, IsString, IsNotEmpty, IsObject } from 'class-validator'; | ||
|
||
|
||
export class SendProofRequest { | ||
export class SendProofRequest { | ||
@ApiProperty({ 'example': '3fa85f64-5717-4562-b3fc-2c963f66afa6' }) | ||
@IsString({message:'connection id must be string'}) | ||
@IsNotEmpty({message:'please provide valid connection Id'}) | ||
@IsString({ message: 'connection id must be string' }) | ||
@IsNotEmpty({ message: 'please provide valid connection Id' }) | ||
connectionId: string; | ||
|
||
@ApiProperty({ | ||
'example': [ | ||
{ | ||
attributeName: 'attributeName', | ||
condition: '>=', | ||
value: 'predicates', | ||
credDefId: '', | ||
credentialName:'' | ||
} | ||
] | ||
{ | ||
attributeName: 'attributeName', | ||
condition: '>=', | ||
value: 'predicates', | ||
credDefId: '', | ||
credentialName: '' | ||
} | ||
] | ||
}) | ||
@IsArray({message:'attributes must be in array'}) | ||
@IsObject({each:true}) | ||
@IsNotEmpty({message:'please provide valid attributes'}) | ||
@IsArray({ message: 'attributes must be in array' }) | ||
@IsObject({ each: true }) | ||
@IsNotEmpty({ message: 'please provide valid attributes' }) | ||
attributes: object[]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters