Skip to content

Commit

Permalink
fix: array items cannot be undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
phanshiyu committed May 2, 2024
1 parent 45cb43c commit 1e5b23d
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/4.0/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,13 +224,11 @@ export const V4Document = _W3cVerifiableCredential
// [Optional] Attachments
attachments: z
.array(
z
.object({
data: z.string().describe("Base64 encoding of this attachment"),
fileName: z.string().min(1).describe("Name of this attachment, with appropriate extensions"),
mimeType: z.string().min(1).describe("Media type (or MIME type) of this attachment"),
})
.optional()
z.object({
data: z.string().describe("Base64 encoding of this attachment"),
fileName: z.string().min(1).describe("Name of this attachment, with appropriate extensions"),
mimeType: z.string().min(1).describe("Media type (or MIME type) of this attachment"),
})
)
.optional(),
})
Expand Down

0 comments on commit 1e5b23d

Please sign in to comment.