Description
Pre-Migration Checklist
- I've read the Migration Guide.
- I've checked AWS Forums and StackOverflow for similar migration issues.
Go Version Used
Go 1.23 (irrelevant).
Describe the Migration Issue
The constants apigatewayv2.PassthroughBehaviorWhenNoMatch
, apigatewayv2.PassthroughBehaviorNever
and apigatewayv2.PassthroughBehaviorWhenNoTemplates
are missing from the v2 SDK.
As a consequence, the code in v2 uses plain magic constants in the source code instead of enum constants defined in the types
package as happens for the other string constants.
Code Comparison
Client.PutIntegration
method takes a PutIntegrationInput
struct with a PassthroughBehavior
field that is a *string
in both v1 and v2, so no difference.
Observed Differences/Errors
One of the major changes in v2 is the use of the types
package to store such enumerations and remove them as inline magic values, so one would expect these pre-existing constants to have been migrated, instead of just removed.
Additional Context
The likely cause is that the SDK is actually missing any use case for these constants, because there does not appear to be unit tests around their behaviour.