Skip to content

Remove phantom Todoset fields never returned by API#193

Merged
jeremy merged 1 commit intobasecamp:mainfrom
robzolkos:remove-phantom-todoset-fields
Mar 18, 2026
Merged

Remove phantom Todoset fields never returned by API#193
jeremy merged 1 commit intobasecamp:mainfrom
robzolkos:remove-phantom-todoset-fields

Conversation

@robzolkos
Copy link
Copy Markdown
Collaborator

@robzolkos robzolkos commented Mar 16, 2026

Summary

  • Removes completed_count, on_schedule_count, and over_schedule_count from the Todoset shape
  • These fields were defined in the Smithy spec and test fixture but the Basecamp API never returns them
  • The BC3 app doesn't compute these values 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
  • Regenerated all language SDKs (Go, TypeScript, Ruby, Kotlin, Swift)

Summary by cubic

Removed phantom Todoset fields that the Basecamp API never returns to avoid misleading zero values and align SDKs with the real response shape.

  • Bug Fixes

    • Removed completed_count, on_schedule_count, and over_schedule_count from the Smithy spec, OpenAPI, and fixtures.
    • Regenerated SDKs (Go, TypeScript, Ruby, Kotlin, Swift) and updated the Go wrapper and tests.
  • Migration

    • Remove any references to these three fields in your code.
    • If you need progress data, use completed_ratio or compute counts from todolists client-side.

Written for commit 591ef7a. Summary will update on new commits.

@robzolkos robzolkos requested a review from a team as a code owner March 16, 2026 16:41
Copilot AI review requested due to automatic review settings March 16, 2026 16:41
@github-actions github-actions bot added typescript Pull requests that update TypeScript code ruby Pull requests that update the Ruby SDK go kotlin swift spec Changes to the Smithy spec or OpenAPI labels Mar 16, 2026
@github-actions
Copy link
Copy Markdown

## 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

@github-actions github-actions bot added bug Something isn't working breaking Breaking change to public API labels Mar 16, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 16, 2026

⚠️ Potential breaking changes detected:

  • Removed fields 'completedCount', 'onScheduleCount', and 'overScheduleCount' from the Todoset struct in the Go SDK.
  • Removed fields 'completedCount', 'onScheduleCount', and 'overScheduleCount' from the Todoset Kotlin data model.
  • Removed fields 'completedCount', 'onScheduleCount', and 'overScheduleCount' from the Todoset Swift model.
  • Removed fields 'completedCount', 'onScheduleCount', and 'overScheduleCount' from the TypeScript schema.

Review carefully before merging. Consider a major version bump.

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 13 files

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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, and over_schedule_count from 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., ListLineupMarkers metadata entry, Ruby LineupMarker type).

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 jeremy mentioned this pull request Mar 18, 2026
6 tasks
Copy link
Copy Markdown
Member

@jeremy jeremy left a comment

Choose a reason for hiding this comment

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

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: Todoset struct in go/pkg/basecamp/todosets.go
  • TypeScript: Todoset type in typescript/src/generated/schema.d.ts
  • Ruby: Todoset class in ruby/lib/basecamp/generated/types.rb
  • Swift: Todoset struct in swift/Sources/Basecamp/Generated/Models/Todoset.swift
  • Kotlin: Todoset data class in kotlin/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.

@jeremy jeremy force-pushed the remove-phantom-todoset-fields branch from 2c565a0 to 591ef7a Compare March 18, 2026 20:55
@github-actions
Copy link
Copy Markdown

## 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

@jeremy jeremy merged commit 4e79133 into basecamp:main Mar 18, 2026
94 of 95 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking Breaking change to public API bug Something isn't working go kotlin ruby Pull requests that update the Ruby SDK spec Changes to the Smithy spec or OpenAPI swift typescript Pull requests that update TypeScript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants