You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There appears to be a mismatch between the config validation and the implementation for aws api gateway apiKeys where multiple usage plans are allowed.
A configuraton warning like:
Configuration warning at 'provider.apiGateway.apiKeys[0].nolimit[0]': should be string
is displayed when an apiKey object is configured where the "multiple usage plan" format is used (see serverless.yml). However the CFT compiles with the configured values and deploys successfully as expected.
CFT will contain valid/expected output along the lines of:
"ApiGatewayApiKeyNolimit1": {
"Type": "AWS::ApiGateway::ApiKey",
"Properties": {
"Enabled": true,
"Description": "Key for unlimited API access",
Happy to PR a fix to the config validation schema.
serverless.yml
service: my-serviceprovider:
name: awsruntime: nodejs14.xstage: blahregion: ap-southeast-2profile: ${env:AWS_PROFILE}endpointType: REGIONALlambdaHashingVersion: 20201221# will become default in serverless 3.0apiGateway:
shouldStartNameWithService: trueapiKeys:
- nolimit:
- description: Key for unlimited API accessusagePlan:
- nolimit:
sls package output
Serverless: Configuration warning at 'provider.apiGateway.apiKeys[0].nolimit[0]': should be string
Serverless:
Serverless: Learn more about configuration validation here: http://slss.io/configuration-validation
Serverless:
Serverless: Packaging service...
Serverless: Excluding development dependencies...
Thanks @lyndoh for reporting. I believe that we indeed have mismatching schema vs what is actually expected and supported when it comes to apiKeys for apiGateway. We'd be more than happy to accept a PR for this one 🙇
I'm finally getting around to a PR for this, but unsure where to add tests for the schema. Is adding new cases to test/unit/lib/configSchema.test.js the correct place?
There appears to be a mismatch between the config validation and the implementation for aws api gateway apiKeys where multiple usage plans are allowed.
A configuraton warning like:
is displayed when an apiKey object is configured where the "multiple usage plan" format is used (see serverless.yml). However the CFT compiles with the configured values and deploys successfully as expected.
CFT will contain valid/expected output along the lines of:
Happy to PR a fix to the config validation schema.
serverless.yml
sls package
outputInstalled version
The text was updated successfully, but these errors were encountered: