Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improper handling of BinaryMediaTypes property #1036

Closed
keetonian opened this issue Jul 23, 2019 · 1 comment
Closed

Improper handling of BinaryMediaTypes property #1036

keetonian opened this issue Jul 23, 2019 · 1 comment

Comments

@keetonian
Copy link
Contributor

Description:

After doing additional verification work with the BinaryMediaTypes property and the fix implemented in #954, I found that the fix still contains an issue.

The BinaryMediaTypes property requires encoded values, so image/gif should be passed to this property as image~1gif.

The x-amazon-apigateway-binary-media-types swagger property cannot read the encoded value, and so the values should be passed to it as image/gif.

Steps to reproduce the issue:

  1. Deploy an API with a binary media type in encoded format
  2. Verify API deployed correctly
  3. Deploy API again, updating BMT section with an additional media type
  4. Verify that the new media type is deployed correctly, but the old type (sometimes) is switched from using a / to using the encoded value (~1) which is incorrect.

Fix: replace ~1 with / for x-amazon-apigateway-binary-media-types property.

@keetonian
Copy link
Contributor Author

Patch fix: 1.13.1

@jlhood jlhood removed the contributors/good-first-issue Good first issue for a contributor label Aug 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants