stepfunction's CallApiGatewayHttpApiEndpointOptions should NOT tightly coupled with target api stack?
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
### Describe the bug
`
/**
* Base properties for calling an HTTP API Endpoint
*/
export interface CallApiGatewayHttpApiEndpointOptions {
/**
* The Id of the API to call
*/
readonly apiId: string;
/**
* The Stack in which the API is defined
*/
readonly apiStack: cdk.Stack;
/**
* Name of the stage where the API is deployed to in API Gateway
* @default '$default'
*/
readonly stageName?: string;
}`
readonly apiStack: cdk.Stack; I'm confused why we need to pass a code reference to the stack where the api is defined,
### Regression Issue
- [ ] Select this option if this issue appears to be a regression.
### Last Known Working CDK Version
_No response_
### Expected Behavior
program design, code review should be conducted or add more comments to make sure user understand
### Current Behavior
api caller is tightly coupled to callee on code ref level
### Reproduction Steps
just take a look
### Possible Solution
program design, code review should be conducted or add more comments to make sure user understand
### Additional Information/Context
_No response_
### CDK CLI Version
2.178.2
### Framework Version
_No response_
### Node.js Version
node20
### OS
ubuntu
### Language
TypeScript
### Language Version
_No response_
### Other information
this is one of the core modules, please do QA on each level
Contributor guide
Research direction
Start with CallApiGatewayHttpApiEndpointOptions and inspect how apiStack is used by the Step Functions HTTP API integration. The issue names no files or tests; done would require an agreed design that removes the unnecessary coupling or clearly documents why it is required, with affected tests updated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- backend-api-design, cloud
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 18/100