Skip to content

Fix null likedBy parsing and DocumentContent model_dump key loss#121

Open
dhruv7539 wants to merge 1 commit intogleanwork:mainfrom
dhruv7539:codex/fix-47-105-answerlikes-serialization
Open

Fix null likedBy parsing and DocumentContent model_dump key loss#121
dhruv7539 wants to merge 1 commit intogleanwork:mainfrom
dhruv7539:codex/fix-47-105-answerlikes-serialization

Conversation

@dhruv7539
Copy link

Summary

  • make AnswerLikes.liked_by nullable so likedBy: null responses parse successfully
  • update DocumentContent.serialize_model to preserve values when model_dump() uses field names internally
  • add regression tests for both cases

Tests

  • PYTHONPATH=src pytest -q tests/test_model_regressions.py

Closes #47
Closes #105

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Model serialization drops keys AnswerLikes.likedBy field validation error: Pydantic expects list but API returns null

1 participant