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

Copy link
Member

@rwjblue-glean rwjblue-glean left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

These files are all auto-generated, any manual changes will be overridden with the next re-generation.

@dhruv7539 dhruv7539 force-pushed the codex/fix-47-105-answerlikes-serialization branch from 79a033f to f584647 Compare March 12, 2026 01:52
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

2 participants