Skip to content

Add per-request header override loop to WriteExecute and remove stray loop #239

Description

@coderabbitai

Description

Per-request header overrides are not being applied in the WriteExecute method in api_open_fga.go. Additionally, there is a stray header override loop outside of any Execute function that should be removed.

Details

  • Missing override in WriteExecute: Around line 4253, the WriteExecute function does not include the per-request header override loop that applies r.options.Headers to localVarHeaderParams.
  • Stray loop: Around line 4298, there is a header override loop outside of any Execute function that should be removed to avoid potential double application.

Expected Behavior

All 17 Execute methods should apply per-request header overrides exactly once by including this loop before calling prepareRequest:

// if any override headers were in the options, set them now
for header, val := range r.options.Headers {
    localVarHeaderParams[header] = val
}

References

Acceptance Criteria

  • Add the per-request header override loop to WriteExecute method
  • Remove the stray header override loop at line ~4298
  • Verify all 17 Execute methods have exactly one header override application
  • Add test coverage to verify WriteExecute applies custom headers correctly

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions