-
Notifications
You must be signed in to change notification settings - Fork 4.1k
fix(apigateway): validation for path parts does not allow creation of resources with colon #22531
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.
✅ Updated pull request passes all PRLinter validations. Dissmissing previous PRLinter review.
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Pull request has been modified.
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
… resources with colon (aws#22531) This PR adjusts the validation rules for path parts in resources created using the APIGateway library to allow the use of colons in pathParts, as requested in aws#22477. This enables the creation of resources with paths such as `events:batch` (from the reproduction steps in the related issue). An existing resource unit test (`'url for a resource'`) has been updated to ensure that a colon in a pathPart does not throw an error and properly reflects in the output of `RestApi.urlForPath`. The integration test `integ.restapi` has also been updated, wherein the `appliances` resource now has a path of `appliances:all` instead of `appliances`. If this is the wrong place to test the fix, I will gladly create a new resource to test on, or a new test altogether. Closes aws#22477. ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [x] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [x] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
This PR adjusts the validation rules for path parts in resources created using the APIGateway library to allow the use of colons in pathParts, as requested in #22477. This enables the creation of resources with paths such as
events:batch
(from the reproduction steps in the related issue).An existing resource unit test (
'url for a resource'
) has been updated to ensure that a colon in a pathPart does not throw an error and properly reflects in the output ofRestApi.urlForPath
. The integration testinteg.restapi
has also been updated, wherein theappliances
resource now has a path ofappliances:all
instead ofappliances
. If this is the wrong place to test the fix, I will gladly create a new resource to test on, or a new test altogether.Closes #22477.
All Submissions:
Adding new Unconventional Dependencies:
New Features
yarn integ
to deploy the infrastructure and generate the snapshot (i.e.yarn integ
without--dry-run
)?By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license