Skip to content

Parse template version warnings as an array - #101

Merged
kenzo0107 merged 1 commit into
mainfrom
fix-template-version-warnings
Oct 28, 2026
Merged

kenzo0107 merged 1 commit into
mainfrom
fix-template-version-warnings

Conversation

@kenzo0107

@kenzo0107 kenzo0107 commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Change OutputGetTemplateVersion.Warnings from Warning to []Warning
  • The SendGrid API returns warnings as an array, so fetching a template version with warnings failed with json: cannot unmarshal array into Go struct field OutputGetTemplateVersion.warnings of type sendgrid.Warning
  • The Create/Update/Activate output types already use []Warning

Refs kenzo0107/terraform-provider-sendgrid#223

Test plan

  • Add a response containing a warnings array to TestGetTemplateVersion (confirmed it fails without the fix)
  • go test ./...
  • golangci-lint run ./...

🤖 Generated with Claude Code

SendGrid returns `warnings` as an array of objects, so GetTemplateVersion failed to unmarshal versions that had warnings.

Refs kenzo0107/terraform-provider-sendgrid#223

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kenzo0107
kenzo0107 merged commit c6f9ee6 into main Oct 28, 2026
3 checks passed
@kenzo0107
kenzo0107 deleted the fix-template-version-warnings branch October 28, 2026 02:44
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.

1 participant