From f7607a9bed07d512121564a19050685b21d8f085 Mon Sep 17 00:00:00 2001 From: Olivier Date: Thu, 15 Feb 2024 14:21:49 +0100 Subject: [PATCH] [DEV] - add omitempty in type for pdf and image (#170) --- block.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block.go b/block.go index 275f405..ea4ba45 100644 --- a/block.go +++ b/block.go @@ -529,7 +529,7 @@ type ImageBlock struct { type Image struct { Caption []RichText `json:"caption,omitempty"` - Type FileType `json:"type"` + Type FileType `json:"type,omitempty"` File *FileObject `json:"file,omitempty"` External *FileObject `json:"external,omitempty"` } @@ -610,7 +610,7 @@ type PdfBlock struct { type Pdf struct { Caption []RichText `json:"caption,omitempty"` - Type FileType `json:"type"` + Type FileType `json:"type,omitempty"` File *FileObject `json:"file,omitempty"` External *FileObject `json:"external,omitempty"` }