ISSUE #27923 - fixed shadowing datetime serialization from jackson#27925
ISSUE #27923 - fixed shadowing datetime serialization from jackson#27925TeddyCr wants to merge 2 commits intoopen-metadata:mainfrom
Conversation
Code Review ✅ ApprovedConfigures Dropwizard's ObjectMapper to serialize date fields as ISO 8601 strings to match JSON schema specifications. No issues found. OptionsDisplay: compact → Showing less information. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
There was a problem hiding this comment.
Pull request overview
Align REST JSON date serialization with the schema/swagger contract by trying to make server-side Jackson emit java.util.Date values as ISO-8601 strings instead of epoch millis. This sits in the service bootstrap/Jersey layer that controls API response encoding.
Changes:
- Configure Dropwizard’s bootstrap
ObjectMapperto disable timestamp serialization and useJsonUtils.DATE_TIME_FORMAT. - Apply the same date serialization settings to
JsonPatchProvider. - Keep date formatting consistent with the existing internal
JsonUtilsmapper configuration.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
openmetadata-service/src/main/java/org/openmetadata/service/OpenMetadataApplication.java |
Updates the bootstrap Jackson mapper used during service initialization. |
openmetadata-service/src/main/java/org/openmetadata/service/JsonPatchProvider.java |
Updates the Jersey ContextResolver<ObjectMapper> used by the JSON Patch provider. |
| bootstrap | ||
| .getObjectMapper() | ||
| .disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) | ||
| .setDateFormat(JsonUtils.DATE_TIME_FORMAT); |
| bootstrap | ||
| .getObjectMapper() | ||
| .disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) | ||
| .setDateFormat(JsonUtils.DATE_TIME_FORMAT); |
🔴 Playwright Results — 2 failure(s), 9 flaky✅ 3992 passed · ❌ 2 failed · 🟡 9 flaky · ⏭️ 87 skipped
Genuine Failures (failed on all attempts)❌
|
|



Describe your changes:
Fixes #27923
Summary
Problem
The application has two ObjectMapper instances:
This means all 18 java.util.Date fields across 15 generated classes (e.g., AirflowConfig.startDate,
Pipeline.startDate, DataContract.effectiveFrom, TagLabel.appliedAt) are stored as ISO 8601 strings in the DB but serialized as epoch millis in REST responses — contradicting the swagger spec which declares them as "format": "date-time".
Fix
Set WRITE_DATES_AS_TIMESTAMPS = false and reuse JsonUtils.DATE_TIME_FORMAT on Dropwizard's
ObjectMapper
Test plan
/v1/services/ingestionPipelines responses
Type of change:
Checklist:
Fixes <issue-number>: <short explanation>Bug fix
Summary by Gitar
JsonPatchProviderto disableWRITE_DATES_AS_TIMESTAMPSand setDATE_TIME_FORMATto ensure consistent date handling across JSON patches.This will update automatically on new commits.