Closed pierskarsenbarg closed 9 months ago
It looks like this line is the cause: https://github.com/pulumi/pulumi-aws-apigateway/blob/1d4ef87b702d9b2e20d1ea25ae9adaf3a2b32226/provider/cmd/pulumi-resource-aws-apigateway/apigateway/api.ts#L820
If we were passing in an empty array or marking it as undefined this line in the generated swagger spec was conflicting and we're running into edge cases depending on whether you're updating the binaryMediaTypes
input or the routes, which then re-generates the swagger body to include the x-amazon-apigateway-binary-media-types
header.
If we completely remove the line linked above, it means that there's going to be no conflicts. If people want to use swagger to define their routes, then this wouldn't have been affected anyway. If users don't set the binaryMediaTypes
then we fall back to */*
anyway and if they do set it then we'll use that.
PR coming imminently.
Hi, how can I set empty array binaryMediaTypes: []
when I am using yaml syntax?
What happened?
If you set the
binaryMediaTypes
input to be an empty array (so nothing is set) and you have more than one route set, thebinaryMediaTypes
is set to[*/*]
. If you then re-run the same update with no changes then it is corrected and the list of binary media types is empty.If you set the
binaryMediaTypes
input to be an empty array (so nothing is set) and you have one route set, then no binary media types are set (this is what we expect).Example
Output of
pulumi about
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).