Skip to content

Commit

Permalink
update schema fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Pratap2018 committed Aug 20, 2024
1 parent 0f5e4da commit 956e710
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 20 deletions.
17 changes: 15 additions & 2 deletions src/credential/dto/create-credential.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,25 @@ export class CreateCredentialDto {
@IsOptional()
subjectDidDocSigned?: JSON;

@ApiHideProperty()
@ApiProperty({
type: String,
isArray: true,
name: 'schemaContext',
required: false,
example: ['https://schema.org'],
})
@ValidateIf((o) => o.schemaId === undefined)
@IsArray()
@ArrayNotEmpty()
schemaContext?: Array<string>;
@ApiHideProperty()
@ApiProperty({
type: String,
isArray: true,
required: false,
example: ['StudentCredential'],

name: 'type',
})
@ValidateIf((o) => o.schemaId === undefined)
@IsArray()
type?: Array<string>;
Expand Down
18 changes: 0 additions & 18 deletions src/schema/dto/create-schema.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,24 +59,6 @@ export class Fields {
isRequired: boolean;
}
export class SchemaBody {
@ApiProperty({
type: String,
isArray: true,
name: 'schemaContext',
required: false,
example: ['https://schema.org'],
})
schemaContext?: Array<string>;

@ApiProperty({
type: String,
isArray: true,
required: false,
example: ['StudentCredential'],

name: 'type',
})
type?: Array<string>;
@ApiProperty({
description: 'Name of the schema',
example: 'Railway ticket schema',
Expand Down

0 comments on commit 956e710

Please sign in to comment.