Skip to content

Commit

Permalink
fix: fixing credential field is not required by the `POST /v1/vc-ap…
Browse files Browse the repository at this point in the history
…i/credentials/issue`
  • Loading branch information
artursudnik committed Sep 8, 2023
1 parent cf3dd51 commit fc44eb7
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import { IsObject, IsOptional, ValidateNested } from 'class-validator';
import { IsNotEmpty, IsNotEmptyObject, IsObject, IsOptional, ValidateNested } from 'class-validator';
import { CredentialDto } from './credential.dto';
import { IssueOptionsDto } from './issue-options.dto';
import { Type } from 'class-transformer';
Expand All @@ -27,6 +27,8 @@ import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
export class IssueCredentialDto {
@ValidateNested()
@Type(() => CredentialDto)
@IsNotEmpty()
@IsNotEmptyObject()
@ApiProperty({ type: CredentialDto })
credential: CredentialDto;

Expand Down

0 comments on commit fc44eb7

Please sign in to comment.