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

fix(apigateway): update imported RestAPIs type to grant access to RestAPIBase methods #26254

Closed
wants to merge 1 commit into from

Conversation

lpizzinidev
Copy link
Contributor

fromRestApiId and fromRestApiAttributes were returning the imported RestAPI as IRestApi, preventing methods implemented by RestAPIBase from being called without type casting.
This fix solves the problem by changing the return type of the two functions.

Closes #26247.


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

@gitpod-io
Copy link

gitpod-io bot commented Jul 6, 2023

@github-actions github-actions bot added bug This issue is a bug. effort/small Small work item – less than a day of effort p2 admired-contributor [Pilot] contributed between 13-24 PRs to the CDK labels Jul 6, 2023
@aws-cdk-automation aws-cdk-automation requested a review from a team July 6, 2023 07:06
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a 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.

A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed add Clarification Request to a comment.

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 6606094
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@lpizzinidev
Copy link
Contributor Author

Exemption Request.
Let me know if integration tests or other changes are needed.

@aws-cdk-automation aws-cdk-automation added pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback. pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. labels Jul 6, 2023
@aws-cdk-automation
Copy link
Collaborator

The pull request linter fails with the following errors:

❌ Fixes must contain a change to an integration test file and the resulting snapshot.

PRs must pass status checks before we can provide a meaningful review.

If you would like to request an exemption from the status checks or clarification on feedback, please leave a comment on this PR containing Exemption Request and/or Clarification Request.

@mrgrain
Copy link
Contributor

mrgrain commented Jul 6, 2023

Hey thanks for the PR, unfortunately we can't go forward with this PR like this. Here's why:

*Base types are not considered "public" and should not be used as return or property types.
I appreciate that in the past we might have not been consistent with that.

You are welcome to open a new PR with a different approach. As this is a p2 issue, we cannot guarantee to have time to work with you on an alternative solution. Please reach out to the wider community for support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
admired-contributor [Pilot] contributed between 13-24 PRs to the CDK bug This issue is a bug. effort/small Small work item – less than a day of effort p2 pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(apigateway): Imported RestAPIs do not have access to its methods due to casting
3 participants