Skip to content

fix(go): resolve datetime aliases for marshal/unmarshal#13159

Merged
jsklan merged 1 commit intomainfrom
jsklan/go-resolve-datetime-aliases-for-marshalling
Mar 5, 2026
Merged

fix(go): resolve datetime aliases for marshal/unmarshal#13159
jsklan merged 1 commit intomainfrom
jsklan/go-resolve-datetime-aliases-for-marshalling

Conversation

@jsklan
Copy link
Copy Markdown
Contributor

@jsklan jsklan commented Mar 5, 2026

Description

Fixes Go SDK generator failing to apply custom datetime serialization when a field's type is a named alias of datetime or date (e.g. DatetimeAlias: type: datetime). Previously, alias fields fell back to default time.Time JSON handling instead of using Fern's custom internal.DateTime helpers.

Link to Devin Session
Requested by: @jsklan

Changes Made

  • Alias resolution: maybeDate, maybeDateProperty, and maybeFormatStructTag now resolve named type aliases before checking for date/datetime primitives
  • Test fixture: Added datetime-api fixture to validate alias handling
  • Seed updates: Updated Go SDK seed outputs and added datetime-api to allowedFailures for generators that don't yet support it

Testing

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 5, 2026

🌱 Seed Test Selector

Select languages to run seed tests for:

  • Python
  • TypeScript
  • Java
  • Go
  • Ruby
  • C#
  • PHP
  • Swift
  • Rust
  • OpenAPI
  • Postman

How to use: Click the ⋯ menu above → "Edit" → check the boxes you want → click "Update comment". Tests will run automatically and snapshots will be committed to this PR.

@jsklan jsklan marked this pull request as ready for review March 5, 2026 20:05
@jsklan jsklan enabled auto-merge (squash) March 5, 2026 20:06
@jsklan jsklan merged commit 0ba3f29 into main Mar 5, 2026
235 of 240 checks passed
@jsklan jsklan deleted the jsklan/go-resolve-datetime-aliases-for-marshalling branch March 5, 2026 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants