Skip to content

fix(webhooks): apply method-level options - #740

Open
fallintoplace wants to merge 1 commit into
openai:mainfrom
fallintoplace:fix/webhook-method-options
Open

fix(webhooks): apply method-level options#740
fallintoplace wants to merge 1 commit into
openai:mainfrom
fallintoplace:fix/webhook-method-options

Conversation

@fallintoplace

Copy link
Copy Markdown
Contributor

Summary

  • apply method-level request options when resolving the webhook secret
  • preserve method-level precedence over client configuration
  • cover method-level secrets and override behavior with regression tests

Why

The webhook verification methods accept request options, but signature verification only applied the service's stored options. As a result, passing option.WithWebhookSecret directly to VerifySignature or Unwrap was ignored and could return the missing-secret error.

Tests

  • go test ./...
  • ./scripts/lint

@fallintoplace
fallintoplace requested a review from a team as a code owner July 29, 2026 21:08

@jbeckwith-oai jbeckwith-oai 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.

Reviewed the option-precedence change and regression coverage. Method-level webhook options are applied after service/client options through the same slices.Concat ordering used by generated request methods, without mutating the stored options. Targeted webhook tests, Go 1.25 compatibility, race tests, vet, lint/build, formatting, and module-tidy checks are clean.

@jbeckwith-oai jbeckwith-oai added the Generator Issue concerns the SDK generator or generated-code patterns. label Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Generator Issue concerns the SDK generator or generated-code patterns.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants