feature/INT-1699 - Date serialization issues, APIShortDate solution with format yyyy-MM-dd - #240
Conversation
🟢 Risk Classification: LOWApproval route: AI Auto-Approval Classification reasons
Operational gates
Files analysed: 6 wall-e 2026.06.19-02 · policy |
🔬 Debug — why this classification?Each reason code emitted by the classifier, its source clause in the AI in SDLC Control Framework, and what it means.
Kinds:
See issue #3 for the proposal to formalise this map as Appendix A of the standards doc. wall-e 2026.06.19-02 · debug |
There was a problem hiding this comment.
✅ Auto-approved — this PR meets all Low-risk criteria.
All checks passed, no unresolved comments, and the change classification is:
no_low_class_matchedprod_source_modified2.2.6_logical_extension:All changes are non-destructive type annotation updates from datetime to str for date-only fields and a serializer bug fix within the existing JsonSerializer class, reusing existing code paths without adding new endpoints, external integrations, persisted data, or auth changes.
wall-e 2026.06.19-02 · policy 376219bc71e6…
b39b4b4 to
2383bce
Compare
🟢 Risk Classification: LOWApproval route: AI Auto-Approval Classification reasons
Operational gates
Files analysed: 6 wall-e 2026.06.19-02 · policy |
🔬 Debug — why this classification?Each reason code emitted by the classifier, its source clause in the AI in SDLC Control Framework, and what it means.
Kinds:
See issue #3 for the proposal to formalise this map as Appendix A of the standards doc. wall-e 2026.06.19-02 · debug |
🟢 Risk Classification: LOWApproval route: AI Auto-Approval Classification reasons
Operational gates
Files analysed: 6 wall-e 2026.06.19-02 · policy |
🔬 Debug — why this classification?Each reason code emitted by the classifier, its source clause in the AI in SDLC Control Framework, and what it means.
Kinds:
See issue #3 for the proposal to formalise this map as Appendix A of the standards doc. wall-e 2026.06.19-02 · debug |
|



This pull request improves the handling and serialization of date and datetime fields in the SDK, ensuring that fields specified as
format: date(yyyy-MM-dd) are correctly annotated asstrand serialized as date-only strings, rather than full timestamps. It also updates theJsonSerializerto properly distinguish betweendateanddatetimeobjects, preventing serialization errors and ensuring compliance with API specifications. Comprehensive tests are added to verify correct serialization behavior and type annotations.Serializer improvements:
JsonSerializerincheckout_sdk/json_serializer.pyto distinguish betweendateanddatetimeobjects, ensuring thatdatefields serialize asyyyy-MM-ddstrings and not as full timestamps. This also fixes a previous bug where serializing adatecould raise aTypeError. [1] [2] [3]SDK model annotation updates:
format: date(e.g.,issue_date,date_of_birth,departure_date,registration_date, etc.) fromdatetimetostr, with inline comments specifying the expected format. This ensures correct serialization and API compatibility. [1] [2] [3] [4] [5] [6] [7]Test coverage:
tests/json_serializer_test.pyto verify correct serialization ofdate,datetime, and subclasses, as well as nested and list scenarios. These tests ensure that onlydatefields are serialized asyyyy-MM-dd, and that the serializer's object reflection and key transformation logic remain unaffected.tests/payments/contexts/payment_contexts_serialization_test.pyandtests/payments/setups/payment_setups_serialization_test.pyto confirm that relevant fields are annotated asstr, serialize correctly, and do not include unset date fields in the output. Tests also document the behavior when adatetimeis mistakenly assigned to a date-only field. [1] [2] [3]