From 2ee3e5d50963b7f1a489834a2f2fdce480f1c420 Mon Sep 17 00:00:00 2001 From: LUCIANO MOTA MORAES Date: Tue, 25 Oct 2022 09:39:08 -0300 Subject: [PATCH 1/3] fix(sam.schema): serverless api model type fix change serverless api model in schema from string to object according to docs and tested cli cmd 'aws sam validate' --- schema/sam.schema.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/schema/sam.schema.json b/schema/sam.schema.json index 64abcce308..a2019769fd 100644 --- a/schema/sam.schema.json +++ b/schema/sam.schema.json @@ -144567,7 +144567,7 @@ "additionalProperties": true, "patternProperties": { "^[a-zA-Z0-9]+$": { - "type": "string" + "type": "object" } }, "type": "object" @@ -157362,7 +157362,7 @@ "additionalProperties": true, "patternProperties": { "^[a-zA-Z0-9]+$": { - "type": "string" + "type": "object" } }, "type": "object" From 3714853338419fdaa9dbed4b5e7fd3c9d6d2063d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 31 Dec 2022 10:24:25 +0100 Subject: [PATCH 2/3] fix(schema): CloudFormation Updates (#531) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: RĂºben Fonseca From 4c8a301f1d85bcc7d9ce9bfd480693e039712ef4 Mon Sep 17 00:00:00 2001 From: Ruben Fonseca Date: Wed, 1 Feb 2023 14:24:40 +0100 Subject: [PATCH 3/3] fix: generation of SAM --- cloudformation/global/api.go | 2 +- cloudformation/serverless/aws-serverless-api.go | 2 +- generate/sam-2016-10-31.json | 2 +- schema/sam.go | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cloudformation/global/api.go b/cloudformation/global/api.go index 86e12e3784..fd2951f96e 100644 --- a/cloudformation/global/api.go +++ b/cloudformation/global/api.go @@ -88,7 +88,7 @@ type Api struct { // Models AWS CloudFormation Property // Required: false // See: https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-resource-api.html#sam-api-models - Models *map[string]string `json:"Models,omitempty"` + Models *map[string]interface{} `json:"Models,omitempty"` // Name AWS CloudFormation Property // Required: false diff --git a/cloudformation/serverless/aws-serverless-api.go b/cloudformation/serverless/aws-serverless-api.go index ff06acce23..b6a7500b23 100644 --- a/cloudformation/serverless/aws-serverless-api.go +++ b/cloudformation/serverless/aws-serverless-api.go @@ -96,7 +96,7 @@ type Api struct { // Models AWS CloudFormation Property // Required: false // See: https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-resource-api.html#sam-api-models - Models map[string]string `json:"Models,omitempty"` + Models map[string]interface{} `json:"Models,omitempty"` // Name AWS CloudFormation Property // Required: false diff --git a/generate/sam-2016-10-31.json b/generate/sam-2016-10-31.json index a0c693b5ae..3db5518f6a 100644 --- a/generate/sam-2016-10-31.json +++ b/generate/sam-2016-10-31.json @@ -402,7 +402,7 @@ "Documentation": "https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-resource-api.html#sam-api-models", "Required": false, "Type": "Map", - "PrimitiveItemType": "String", + "PrimitiveItemType": "Map", "UpdateType": "Immutable" }, "Tags": { diff --git a/schema/sam.go b/schema/sam.go index 95648072a2..35de80a614 100644 --- a/schema/sam.go +++ b/schema/sam.go @@ -144572,7 +144572,7 @@ var SamSchema = `{ "additionalProperties": true, "patternProperties": { "^[a-zA-Z0-9]+$": { - "type": "string" + "type": "object" } }, "type": "object" @@ -157367,7 +157367,7 @@ var SamSchema = `{ "additionalProperties": true, "patternProperties": { "^[a-zA-Z0-9]+$": { - "type": "string" + "type": "object" } }, "type": "object"