(aws-events-targets): ApiDestination target ignores path_parameter_values and query_string_parameters #21101
Labels
@aws-cdk/aws-events-targets
bug
This issue is a bug.
needs-triage
This issue or PR still needs to be triaged.
Describe the bug
ApiDestination target construct ignores
path_parameter_values
andquery_string_parameters
if noheader_parameters
are provided.Expected Behavior
If only
path_parameter_values
is provided it is rendered to CF templateIf only
query_string_parameters
is provided it is rendered to CF templateCurrent Behavior
Currently both
path_parameter_values
andquery_string_parameters
parameters are ignored andHttpParameters
object is not added to CF template.But if
header_parameters
is added everything seems to work.HttpParameters
object is added to CF template and it even correctly representspath_parameter_values
andquery_string_parameters
parameters.Reproduction Steps
Possible Solution
I'm not a TypeScript developer. But it seems that problem is combination of
!!
and??
operators in this condition.aws-cdk/packages/@aws-cdk/aws-events-targets/lib/api-destination.ts
Lines 71 to 80 in bf35048
Additional Information/Context
No response
CDK CLI Version
2.31.1 (build 42432c6)
Framework Version
No response
Node.js Version
v16.3.0
OS
macOS 12.4
Language
Python
Language Version
Python 3.8
Other information
No response
The text was updated successfully, but these errors were encountered: