@@ -203,33 +203,33 @@ def validate_titles(titles: list) -> Tuple[bool, List[str]]:
203203
204204def validate_poster_content (poster_content : dict ) -> Tuple [bool , List [str ]]:
205205 """
206- Validate the posterContent structure.
206+ Validate the content structure.
207207
208208 Args:
209- poster_content: The posterContent object
209+ poster_content: The content object
210210
211211 Returns:
212212 Tuple of (is_valid, list_of_issues)
213213 """
214214 issues = []
215215
216216 if not isinstance (poster_content , dict ):
217- return False , ["posterContent must be an object" ]
217+ return False , ["content must be an object" ]
218218
219219 sections = poster_content .get ("sections" , [])
220220 if not isinstance (sections , list ):
221- issues .append ("posterContent .sections must be an array" )
221+ issues .append ("content .sections must be an array" )
222222 elif len (sections ) == 0 :
223- issues .append ("posterContent .sections should have at least one section" )
223+ issues .append ("content .sections should have at least one section" )
224224 else :
225225 for i , section in enumerate (sections ):
226226 if not isinstance (section , dict ):
227- issues .append (f"posterContent .sections[{ i } ] must be an object" )
227+ issues .append (f"content .sections[{ i } ] must be an object" )
228228 continue
229229 if "sectionTitle" not in section :
230- issues .append (f"posterContent .sections[{ i } ] missing 'sectionTitle'" )
230+ issues .append (f"content .sections[{ i } ] missing 'sectionTitle'" )
231231 if "sectionContent" not in section :
232- issues .append (f"posterContent .sections[{ i } ] missing 'sectionContent'" )
232+ issues .append (f"content .sections[{ i } ] missing 'sectionContent'" )
233233
234234 return len (issues ) == 0 , issues
235235
@@ -316,12 +316,12 @@ def validate_comprehensive(data: dict) -> Dict[str, Union[bool, List[str]]]:
316316 result ["field_issues" ].extend (issues )
317317
318318 # Poster content validation
319- if "posterContent " in data :
320- valid , issues = validate_poster_content (data ["posterContent " ])
319+ if "content " in data :
320+ valid , issues = validate_poster_content (data ["content " ])
321321 if not valid :
322322 result ["field_issues" ].extend (issues )
323323 else :
324- result ["warnings" ].append ("posterContent is missing - no sections extracted" )
324+ result ["warnings" ].append ("content is missing - no sections extracted" )
325325
326326 # Caption validation
327327 if "imageCaptions" in data :
0 commit comments