Skip to content

TW-3961: include grantID in get folders response#313

Open
googsvg wants to merge 1 commit intomainfrom
TW-3961-v-3-java-sdk-grant-id-isnt-included-in-the-get-folders-response2
Open

TW-3961: include grantID in get folders response#313
googsvg wants to merge 1 commit intomainfrom
TW-3961-v-3-java-sdk-grant-id-isnt-included-in-the-get-folders-response2

Conversation

@googsvg
Copy link
Copy Markdown
Contributor

@googsvg googsvg commented Apr 29, 2026

Ticket: TW-3961

Problem

Folder.id and Folder.grantId were declared as non-nullable String with no default value. When the select query parameter was used without including these fields, Moshi
threw:

Required value 'grantId' (JSON name 'grant_id') missing at $.data[1]

Fix

Added empty string defaults to both fields so Moshi falls back gracefully instead of crashing. Type remains String (non-nullable) — no breaking change for existing consumers.

Changes

  • Folder.ktid and grantId default to ""
  • FoldersTests.kt — 2 new serialization tests covering partial responses via select

License

I confirm that this contribution is made under the terms of the MIT license and that I have the authority necessary to make this contribution on behalf of its copyright owner.

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.47%. Comparing base (ded101e) to head (9cadacf).

Additional details and impacted files
@@            Coverage Diff            @@
##               main     #313   +/-   ##
=========================================
  Coverage     82.47%   82.47%           
  Complexity      357      357           
=========================================
  Files            37       37           
  Lines          1027     1027           
  Branches         95       95           
=========================================
  Hits            847      847           
  Misses          121      121           
  Partials         59       59           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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