Skip to content

Conversation

keetonian
Copy link
Contributor

Issue #, if available:
#1036

Description of changes:
Converts ~1 to /, as is expected in the swagger for binary media types.

The CloudFormation property expects ~1. Docs: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-restapi.html#cfn-apigateway-restapi-binarymediatypes

The Swagger property expects /. Docs: https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-swagger-extensions-binary-media-types.html

Description of how you validated changes:
Tests updated and pass.

Checklist:

  • Write/update tests
  • make pr passes
  • Update documentation
  • Verify transformed template deploys and application functions as expected

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@keetonian keetonian changed the title Binary media types Binary media types bug fix Jul 25, 2019
@codecov-io
Copy link

codecov-io commented Jul 25, 2019

Codecov Report

Merging #1043 into develop will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1043      +/-   ##
===========================================
+ Coverage    94.82%   94.82%   +<.01%     
===========================================
  Files           69       69              
  Lines         3244     3248       +4     
  Branches       632      632              
===========================================
+ Hits          3076     3080       +4     
  Misses          87       87              
  Partials        81       81
Impacted Files Coverage Δ
samtranslator/model/sam_resources.py 95.62% <100%> (+0.02%) ⬆️
samtranslator/swagger/swagger.py 97.5% <100%> (+0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0712837...9a67613. Read the comment docs.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dump it into json so all nested lists and dictionaries are expressed as a string, replace the ~1 with /, and then load back into data form.

@keetonian keetonian force-pushed the binary-media-types branch from c6cd846 to 9a67613 Compare July 25, 2019 22:25
@praneetap praneetap merged commit 7fd10a7 into aws:develop Jul 26, 2019
keetonian added a commit that referenced this pull request Jul 26, 2019
@keetonian keetonian mentioned this pull request Aug 6, 2019
@keetonian keetonian deleted the binary-media-types branch August 17, 2019 06:13
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.

4 participants