Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
feat(aws-apigateway): add support for UsagePlan, ApiKey, UsagePlanKey… #1221
feat(aws-apigateway): add support for UsagePlan, ApiKey, UsagePlanKey… #1221
Changes from 1 commit
a0aee19
9c1bdf4
832d09d
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Don't know why this couldn't just be
?
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.
I like numeric fields to carry some form of a unit hint. At the very least, the documentation should mention it. Similar to previously, this probably should be a copy from the documentation in the CloudFormation documentation for the
AWS::ApiGateway::UsagePlan
resource.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.
I was hoping that a reviewer would point this out tbh with you. I was of the opinion that there may (must) be a way we can enforce certain validation of the inputs as part of these
number
. For example,burstLimit
is required to be an Integer value. If not, the App deployment would fail. Perhaps throwing an error during runtime before cfn is deployed, CDK emit an error with appropriate messaging. Think of it likecdk.ValidateNumber
but for Integers.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.
Diligent code could validate types beyond what the TypeScript (really, JavaScript) types can represent (Javascript has no concept of an
int
type, but you can useNumber.isInteger
to check & do the right thing).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.
Interesting way of modeling defaults. Should this path also be taken if the user passes
{}
?To be honest, this makes me a little uncomfortable. I'd rather you default
props
to{}
and do processing that makes sense in both cases.