This repository has been archived by the owner on Apr 16, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixing
AWS::Serverless::Api.MethodSettings
(#222)
* - Fixing wrong type in the specification file - Updating `js-yaml` Typescript module - Removing the definition overloading now patched fixed thanks to the previous update * - Adding test cases and fixing previous according to the standard - Fixing missing `ItemType` in the new schema - Adding required properties in `MethodSetting` * - Adding test templates in the test case - Moving typing module in the devDep - Generating `sam_20161031_cfn.json` * Fix whitespace and IDE changes * Add to changelog
- Loading branch information
1 parent
c2690b1
commit 9f08c3f
Showing
9 changed files
with
190 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
81 changes: 81 additions & 0 deletions
81
testData/invalid/yaml/sam_20161031_api_methodsettings_missing_required.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
AWSTemplateFormatVersion : '2010-09-09' | ||
Transform: AWS::Serverless-2016-10-31 | ||
Description: A hello world application. | ||
|
||
Globals: | ||
Function: | ||
Handler: index.handler | ||
Runtime: nodejs6.10 | ||
CodeUri: src/ | ||
DeadLetterQueue: | ||
Type: SNS | ||
TargetArn: arn:aws:sns:us-east-1:84969EXAMPLE:DeadLetterQueue | ||
Description: somethingCool | ||
MemorySize: 512 | ||
Timeout: 10 | ||
VpcConfig: | ||
SecurityGroupIds: | ||
- SGID0 | ||
SubnetIds: | ||
- SID0 | ||
Environment: | ||
Variables: | ||
VAR0: 0 | ||
Tags: | ||
TAG0: tag0 | ||
Tracing: PassThrough | ||
KmsKeyArn: arn:aws:sns:us-east-1:84969EXAMPLE:KmsKeyArn | ||
AutoPublishAlias: live | ||
DeploymentPreference: | ||
Type: Linear10PercentEvery10Minutes | ||
|
||
Api: | ||
Name: ServerlessRestApi | ||
DefinitionUri: s3://s3-eu-west-1.amazonaws.com/s3test.example.com | ||
CacheClusterEnabled: True | ||
CacheClusterSize: 1024M | ||
Variables: | ||
VAR1: 1 | ||
EndpointConfiguration: EDGE | ||
MethodSettings: | ||
- CacheDataEncrypted: True | ||
BinaryMediaTypes: | ||
- image~1gif | ||
- image~1png | ||
Cors: example.com | ||
|
||
SimpleTable: | ||
SSESpecification: | ||
SSEEnabled: True | ||
|
||
|
||
Resources: | ||
HelloWorldFunction: | ||
Type: AWS::Serverless::Function | ||
Properties: | ||
VpcConfig: | ||
SecurityGroupIds: | ||
- SGID1 | ||
SubnetIds: | ||
- SID1 | ||
Tags: | ||
TAG1: tag1 | ||
Environment: | ||
Variables: | ||
VAR2: shouldBe2 | ||
|
||
HelloWorldAPI: | ||
Type: AWS::Serverless::Api | ||
Properties: | ||
StageName: Prod | ||
EndpointConfiguration: REGIONAL | ||
BinaryMediaTypes: | ||
- image~1exe | ||
Variables: | ||
VAR2: 2 | ||
VAR3: 3 | ||
|
||
HelloWorldTable: | ||
Type: AWS::Serverless::SimpleTable | ||
Properties: | ||
TableName: example-table |
83 changes: 83 additions & 0 deletions
83
testData/invalid/yaml/sam_20161031_api_methodsettings_not_a_list.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
AWSTemplateFormatVersion : '2010-09-09' | ||
Transform: AWS::Serverless-2016-10-31 | ||
Description: A hello world application. | ||
|
||
Globals: | ||
Function: | ||
Handler: index.handler | ||
Runtime: nodejs6.10 | ||
CodeUri: src/ | ||
DeadLetterQueue: | ||
Type: SNS | ||
TargetArn: arn:aws:sns:us-east-1:84969EXAMPLE:DeadLetterQueue | ||
Description: somethingCool | ||
MemorySize: 512 | ||
Timeout: 10 | ||
VpcConfig: | ||
SecurityGroupIds: | ||
- SGID0 | ||
SubnetIds: | ||
- SID0 | ||
Environment: | ||
Variables: | ||
VAR0: 0 | ||
Tags: | ||
TAG0: tag0 | ||
Tracing: PassThrough | ||
KmsKeyArn: arn:aws:sns:us-east-1:84969EXAMPLE:KmsKeyArn | ||
AutoPublishAlias: live | ||
DeploymentPreference: | ||
Type: Linear10PercentEvery10Minutes | ||
|
||
Api: | ||
Name: ServerlessRestApi | ||
DefinitionUri: s3://s3-eu-west-1.amazonaws.com/s3test.example.com | ||
CacheClusterEnabled: True | ||
CacheClusterSize: 1024M | ||
Variables: | ||
VAR1: 1 | ||
EndpointConfiguration: EDGE | ||
MethodSettings: | ||
HttpMethod: GET | ||
ResourcePath: /* | ||
CacheDataEncrypted: True | ||
BinaryMediaTypes: | ||
- image~1gif | ||
- image~1png | ||
Cors: example.com | ||
|
||
SimpleTable: | ||
SSESpecification: | ||
SSEEnabled: True | ||
|
||
|
||
Resources: | ||
HelloWorldFunction: | ||
Type: AWS::Serverless::Function | ||
Properties: | ||
VpcConfig: | ||
SecurityGroupIds: | ||
- SGID1 | ||
SubnetIds: | ||
- SID1 | ||
Tags: | ||
TAG1: tag1 | ||
Environment: | ||
Variables: | ||
VAR2: shouldBe2 | ||
|
||
HelloWorldAPI: | ||
Type: AWS::Serverless::Api | ||
Properties: | ||
StageName: Prod | ||
EndpointConfiguration: REGIONAL | ||
BinaryMediaTypes: | ||
- image~1exe | ||
Variables: | ||
VAR2: 2 | ||
VAR3: 3 | ||
|
||
HelloWorldTable: | ||
Type: AWS::Serverless::SimpleTable | ||
Properties: | ||
TableName: example-table |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters