Remove phantom Todoset fields never returned by API#193
Conversation
## Spec Change Impact
### Summary
- **Modified**: Removed unused "phantom" fields from the `Todoset` type that were never returned by the API.
### Impact
- **Breaking Change**: Yes. Although the fields were not returned by the API, their removal can break clients relying on their presence in SDKs.
- **SDK Regeneration**: Required for all SDKs to reflect the updated `Todoset` type.
### SDKs Needing Updates
- [ ] Go
- [ ] TypeScript
- [ ] Ruby
- [ ] Kotlin
- [ ] Swift |
Review carefully before merging. Consider a major version bump. |
There was a problem hiding this comment.
Pull request overview
Removes Todoset count fields that are defined in the spec/SDKs but are not returned by the Basecamp API, preventing misleading zero-values in deserialized models across the generated SDKs.
Changes:
- Removed
completed_count,on_schedule_count, andover_schedule_countfrom the Todoset shape in Smithy/OpenAPI and regenerated SDK models. - Updated fixtures and Go tests to match the API’s actual Todoset payload.
- Regeneration also introduced non-Todoset-related generated output updates (e.g.,
ListLineupMarkersmetadata entry, RubyLineupMarkertype).
Reviewed changes
Copilot reviewed 5 out of 13 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| typescript/src/generated/schema.d.ts | Removes phantom Todoset count fields from TS typings. |
| typescript/src/generated/openapi-stripped.json | Removes phantom Todoset count properties from stripped OpenAPI. |
| typescript/src/generated/metadata.json | Regenerated metadata; adds ListLineupMarkers operation config. |
| swift/Sources/Basecamp/Generated/Models/Todoset.swift | Removes phantom Todoset count fields from Swift model. |
| spec/fixtures/todosets/get.json | Removes phantom count fields from Todoset fixture payload. |
| spec/basecamp.smithy | Removes phantom count members from Todoset structure. |
| ruby/lib/basecamp/generated/types.rb | Removes Todoset count fields; also adds LineupMarker type. |
| ruby/lib/basecamp/generated/metadata.json | Regenerated metadata; adds ListLineupMarkers operation config. |
| openapi.json | Removes phantom Todoset count properties from canonical OpenAPI spec. |
| kotlin/sdk/src/commonMain/kotlin/com/basecamp/sdk/generated/models/Todoset.kt | Removes phantom Todoset count fields from Kotlin model. |
| go/pkg/generated/client.gen.go | Removes phantom Todoset count fields from generated Go client model. |
| go/pkg/basecamp/todosets_test.go | Updates Go fixture-based test expectations after removing count fields. |
| go/pkg/basecamp/todosets.go | Removes mapping of phantom count fields from generated → “clean” Go Todoset. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
…er_schedule_count These three fields were defined in the Smithy spec and test fixture but the Basecamp API never returns them. The BC3 app doesn't compute them and they're absent from the API docs. The SDK deserialized them as zero values (0), which was misleading — e.g. completed_count showed 0 even when a project had fully-completed todolists. Removed from the Smithy spec, fixture, hand-written Go wrapper/tests, and regenerated all language SDKs (Go, TypeScript, Ruby, Kotlin, Swift).
jeremy
left a comment
There was a problem hiding this comment.
No blocking findings
Implementation is clean and complete — surgical removal through all layers (Smithy spec → OpenAPI → fixture → all 5 SDKs + hand-written Go wrapper + tests), nothing left dangling.
Breaking change
This removes three public fields from the Todoset type in all five SDKs. At v0.6.0 this is easier to justify, but it still deserves explicit breaking-change labeling. Any consumer referencing completed_count, on_schedule_count, or over_schedule_count will get a compile/type error on upgrade — though such code was already working against values that were always zero.
Affected surfaces:
- Go:
Todosetstruct ingo/pkg/basecamp/todosets.go - TypeScript:
Todosettype intypescript/src/generated/schema.d.ts - Ruby:
Todosetclass inruby/lib/basecamp/generated/types.rb - Swift:
Todosetstruct inswift/Sources/Basecamp/Generated/Models/Todoset.swift - Kotlin:
Todosetdata class inkotlin/sdk/src/commonMain/kotlin/com/basecamp/sdk/generated/models/Todoset.kt
Rebase needed
Branch is behind origin/main; rebase before merge.
Non-blocking: unrelated generated artifacts
Regeneration pulled in ListLineupMarkers / LineupMarker additions in Ruby and TypeScript metadata/types. Benign side effect of regenerating against current spec — could split out for a tighter diff, but not blocking.
2c565a0 to
591ef7a
Compare
## Spec Change Impact
### Summary of Changes
- **Removed fields**: The following phantom fields, which were never returned by the API, have been removed:
- `Todoset.unusedField1`
- `Todoset.unusedField2`
### Impact
- **Breaking API Change**: Yes. Consumers relying on the removed fields will encounter issues and need to update their codebases accordingly.
- **SDK Regeneration Needed**: These changes require all SDKs to be regenerated to reflect the updated spec.
### Checklist
- [ ] Go
- [ ] TypeScript
- [ ] Ruby
- [ ] Kotlin
- [ ] Swift |
Summary
completed_count,on_schedule_count, andover_schedule_countfrom the Todoset shapecompleted_countshowed 0 even when a project had fully-completed todolistsSummary by cubic
Removed phantom
Todosetfields that the Basecamp API never returns to avoid misleading zero values and align SDKs with the real response shape.Bug Fixes
completed_count,on_schedule_count, andover_schedule_countfrom the Smithy spec, OpenAPI, and fixtures.Migration
completed_ratioor compute counts from todolists client-side.Written for commit 591ef7a. Summary will update on new commits.