Skip to content

Change operations request types from bare structs to pointers#105

Open
c1-dev-bot[bot] wants to merge 1 commit into
mainfrom
iga-732-pointer-request-types
Open

Change operations request types from bare structs to pointers#105
c1-dev-bot[bot] wants to merge 1 commit into
mainfrom
iga-732-pointer-request-types

Conversation

@c1-dev-bot
Copy link
Copy Markdown

@c1-dev-bot c1-dev-bot Bot commented Apr 7, 2026

Summary

  • Changes all SDK method signatures to accept *operations.SomeType (pointer) instead of operations.SomeType (bare struct) for the request parameter
  • The shared.* request types were already pointers; this makes the operations.* types consistent
  • Enables better use of interfaces and generics when working with the SDK
  • Updated .ci/main.go build test to use pointer syntax

Details

This is a breaking change for SDK consumers — callers need to prefix request literals with &. For example:

// Before
client.Task.Get(ctx, operations.C1APITaskV1TaskServiceGetRequest{ID: taskId})

// After
client.Task.Get(ctx, &operations.C1APITaskV1TaskServiceGetRequest{ID: taskId})

The internal utility functions (GenerateURL, PopulateQueryParams, SerializeRequestBody) already handle both value and pointer types via reflection, so no internal changes were needed.

194 method signatures updated across 40 files.

Test plan

  • go build ./... passes
  • go test ./... passes
  • CI checks pass

Resolves IGA-732

All SDK method signatures now accept *operations.SomeType instead of
operations.SomeType for the request parameter. This enables better
use of interfaces and generics when working with the SDK, with no
realistic performance impact given typical GC escape volumes.

The shared.* request types were already pointers; this makes the
operations.* types consistent.

IGA-732
@linear
Copy link
Copy Markdown

linear Bot commented Apr 7, 2026

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.

0 participants