Skip to content

Document OpenAPI datetimes as epoch-millis int64 - #1111

Open
ehoogerbeets wants to merge 1 commit into
box:masterfrom
ehoogerbeets:fix/LXP-2898-openapi-datetime-epoch-millis
Open

ehoogerbeets wants to merge 1 commit into
box:masterfrom
ehoogerbeets:fix/LXP-2898-openapi-datetime-epoch-millis

Conversation

@ehoogerbeets

Copy link
Copy Markdown
Contributor

Summary

  • Align generated OpenAPI schemas with Mojito's Jackson wire format so ZonedDateTime, Instant, and java.util.Date are documented as integer / int64 (epoch milliseconds) instead of string / date-time.
  • Add a springdoc smoke test covering representative fields for each type, and note the epoch-millis contract in the CLI API guide.
  • Fixes LXP-2898.

Test plan

  • mvn -Dtest=OpenApiWSTest test in webapp
  • mvn test -DexcludedGroups=com.box.l10n.mojito.test.category.IntegrationTest in webapp (1409 tests, 0 failures)
  • Enable springdoc.api-docs.enabled=true locally and confirm GET /api-docs shows createdDate, timestamp, and uploadTime as integer/int64
  • Optionally generate a client from --spec and verify datetime fields deserialize as numbers

Made with Cursor

Springdoc was advertising ISO date-time strings while Jackson serializes
ZonedDateTime, Instant, and Date as epoch milliseconds, which breaks
clients generated from /api-docs.

Co-authored-by: Cursor <cursoragent@cursor.com>

This branch has not been deployed

No deployments
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.

1 participant