apigatewayv2: contains unused constructs that wrap v1 types
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
### Describe the bug
I just noticed that the apigatewayv2 package contains useless classes.
`apigatewayv2.ApiKey` wraps an API Gateway V1 `CfnApiKey`. It is only used by an `apigatewayv2.UsagePlan`, which also wraps a V1 `CfnUsagePlan`. That class doesn't seem to be used anywhere.
We can't remove it because some people might be relying on classes in the wrong places, but we should deprecate them and document that they shouldn't be used.
### Regression Issue
- [ ] Select this option if this issue appears to be a regression.
### Last Known Working CDK Library Version
_No response_
### Expected Behavior
-
### Current Behavior
--
### Reproduction Steps
-
### Possible Solution
_No response_
### Additional Information/Context
_No response_
### AWS CDK Library version (aws-cdk-lib)
-
### AWS CDK CLI version
-
### Node.js Version
-
### OS
-
### Language
TypeScript
### Language Version
_No response_
### Other information
_No response_
Contributor guide
Research direction
Locate the apigatewayv2.ApiKey and apigatewayv2.UsagePlan constructs and inspect their CfnApiKey and CfnUsagePlan wrappers. Confirm their usage, then review the package's deprecation and documentation conventions; done means both constructs are deprecated and clearly documented as not intended for use in apigatewayv2.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- api, cloud
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100