Skip to content

Commit b18d3ee

Browse files
authored
Add required fields for image properties in JSON schemas (#1960)
1 parent cc47bec commit b18d3ee

3 files changed

Lines changed: 14 additions & 8 deletions

File tree

schemas/image-rendition.schema.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@
4444
"description": "The height of the JPEG image",
4545
"type": "integer"
4646
}
47-
}
47+
},
48+
"required": ["url", "full_url", "width", "height"]
4849
},
4950
"webp": {
5051
"description": "The WebP version of the image",
@@ -66,7 +67,8 @@
6667
"description": "The height of the WebP image",
6768
"type": "integer"
6869
}
69-
}
70+
},
71+
"required": ["url", "full_url", "width", "height"]
7072
}
7173
},
7274
"required": ["id", "uuid", "title", "description", "jpeg", "webp"]

schemas/image.schema.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@
7878
"description": "The height of the JPEG image",
7979
"type": "integer"
8080
}
81-
}
81+
},
82+
"required": ["url", "full_url", "width", "height"]
8283
},
8384
"webp": {
8485
"description": "The WebP version of the image",
@@ -100,7 +101,8 @@
100101
"description": "The height of the WebP image",
101102
"type": "integer"
102103
}
103-
}
104+
},
105+
"required": ["url", "full_url", "width", "height"]
104106
}
105107
},
106108
"required": ["id", "title", "tags", "uuid", "jpeg", "webp"]

schemas/images.schema.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@
6363
"description": "The height of the JPEG image",
6464
"type": "integer"
6565
}
66-
}
66+
},
67+
"required": ["url", "full_url", "width", "height"]
6768
},
6869
"webp": {
6970
"description": "The WebP version of the image",
@@ -85,11 +86,12 @@
8586
"description": "The height of the WebP image",
8687
"type": "integer"
8788
}
88-
}
89+
},
90+
"required": ["url", "full_url", "width", "height"]
8991
}
90-
}
92+
},
93+
"required": ["id", "title", "tags", "uuid", "jpeg", "webp"]
9194
},
92-
"required": ["id", "title", "tags", "uuid", "jpeg", "webp"],
9395
"uniqueItems": true
9496
}
9597
},

0 commit comments

Comments
 (0)