From 43e87d928be8b1de98049e3a67989ef5b6ec3576 Mon Sep 17 00:00:00 2001 From: LUCIANO MOTA MORAES Date: Wed, 1 Feb 2023 10:28:35 -0300 Subject: [PATCH] feat(sam): serverless api model type fix (#515) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: RĂºben Fonseca Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- cloudformation/global/api.go | 2 +- cloudformation/serverless/aws-serverless-api.go | 2 +- generate/sam-2016-10-31.json | 2 +- schema/sam.go | 4 ++-- schema/sam.schema.json | 4 ++-- 5 files changed, 7 insertions(+), 7 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" 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"