Skip to content

Conversation

cloutierMat
Copy link
Contributor

@cloutierMat cloutierMat commented Dec 12, 2024

Motivation

As reported by a user, if a YAML OpenApi specs passes a Boolean value for request parameter mapping, we would fail the invocation for that integration.

While the value is invalid, AWS doesn't fail and instead just ignores the parameter when importing the api and adds a warning to the response.

Changes

  • Make sure that a boolean value cannot be added as an integration request parameters mapping
  • adds warnings to the response of the import.

Notes

If the flags failsOnWarning is provided, we should instead revert the changes when encountering a warning. But this is something we will need to tackle in a follow up as it would require much bigger changes to the import and put endpoints and the helpers method

@cloutierMat cloutierMat added aws:apigateway Amazon API Gateway semver: patch Non-breaking changes which can be included in patch releases labels Dec 12, 2024
@cloutierMat cloutierMat added this to the 4.1 milestone Dec 12, 2024
@cloutierMat cloutierMat self-assigned this Dec 12, 2024
@cloutierMat cloutierMat requested a review from bentsku as a code owner December 12, 2024 22:51
@cloutierMat cloutierMat changed the title added warning for incorrect request parameter value apigw fix openapi request parameters Dec 12, 2024
Copy link
Contributor

@bentsku bentsku left a comment

Choose a reason for hiding this comment

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

LGTM! This was a fun one 😬 especially since JSON spec files are failing straight away, so it was hard to reproduce!

Very nice find 🚀

Copy link

LocalStack Community integration with Pro

    2 files  ±0      2 suites  ±0   1h 52m 45s ⏱️ -58s
3 893 tests ±0  3 583 ✅ ±0  310 💤 ±0  0 ❌ ±0 
3 895 runs  ±0  3 583 ✅ ±0  312 💤 ±0  0 ❌ ±0 

Results for commit 83f6989. ± Comparison against base commit 52df10a.

@cloutierMat cloutierMat merged commit 630f782 into master Dec 13, 2024
40 of 41 checks passed
@cloutierMat cloutierMat deleted the apigw-fix-openapi-request-parameters branch December 13, 2024 00:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aws:apigateway Amazon API Gateway semver: patch Non-breaking changes which can be included in patch releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants