Skip to content

Commit f7607a9

Browse files
authored
[DEV] - add omitempty in type for pdf and image (#170)
1 parent 88e7f04 commit f7607a9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

block.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ type ImageBlock struct {
529529

530530
type Image struct {
531531
Caption []RichText `json:"caption,omitempty"`
532-
Type FileType `json:"type"`
532+
Type FileType `json:"type,omitempty"`
533533
File *FileObject `json:"file,omitempty"`
534534
External *FileObject `json:"external,omitempty"`
535535
}
@@ -610,7 +610,7 @@ type PdfBlock struct {
610610

611611
type Pdf struct {
612612
Caption []RichText `json:"caption,omitempty"`
613-
Type FileType `json:"type"`
613+
Type FileType `json:"type,omitempty"`
614614
File *FileObject `json:"file,omitempty"`
615615
External *FileObject `json:"external,omitempty"`
616616
}

0 commit comments

Comments
 (0)