Skip to content

Fix: Update Get and List tasks schemas type overrides#361

Merged
rafaeljusto merged 2 commits into
mainfrom
fix/update-schemas-overrides
Jun 22, 2026
Merged

Fix: Update Get and List tasks schemas type overrides#361
rafaeljusto merged 2 commits into
mainfrom
fix/update-schemas-overrides

Conversation

@Adam1770

Copy link
Copy Markdown
Contributor

Add schema generation type override for twapi.Date for tasks Get and List responses.

Connected to changes in twapi-go-sdk.

Description

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Testing

  • Tests pass locally (go test -v ./...)
  • Added/updated tests for new functionality

Checklist

  • Code follows project style guidelines
  • Self-reviewed the code
  • Added necessary documentation
  • No new warnings or errors

@Adam1770 Adam1770 requested a review from a team as a code owner June 22, 2026 14:58
The twapi.Date JSON-schema override was inlined in the task get/list
output schemas, but the same Task struct (with its twapi.Date startDate/
dueDate fields) is also sideloaded into the calendar event list and
search responses, which were generating the wrong schema for those
nested dates.

Extract the override into a reusable helpers.WithDateTypeSchema option
and apply it to all four response schemas: task get/list, calendar event
list, and search.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@rafaeljusto rafaeljusto left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice one! I've sent a patch to cover a few more places.

There's an ongoing discussion here that would simplify this solution:
google/jsonschema-go#78

@rafaeljusto rafaeljusto merged commit 9692443 into main Jun 22, 2026
3 checks passed
@rafaeljusto rafaeljusto deleted the fix/update-schemas-overrides branch June 22, 2026 15:51
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.

2 participants