From 73a1de1cecd57b45335fbcf6eef24d3d0cdeefd9 Mon Sep 17 00:00:00 2001 From: daiwei920 Date: Wed, 11 Sep 2019 19:42:45 +1000 Subject: [PATCH] fix(apigateway): json schema additionalProperties should be boolean (#3997) * Add support for json schema additionalProperties * Change it to boolean according to code review * add breaking change exclusions --- allowed-breaking-changes.txt | 3 +++ packages/@aws-cdk/aws-apigateway/lib/json-schema.ts | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/allowed-breaking-changes.txt b/allowed-breaking-changes.txt index b5af5b771c241..12982b9ea1c9c 100644 --- a/allowed-breaking-changes.txt +++ b/allowed-breaking-changes.txt @@ -16,3 +16,6 @@ incompatible-argument:@aws-cdk/aws-lambda.Function. incompatible-argument:@aws-cdk/aws-lambda.SingletonFunction. incompatible-argument:@aws-cdk/aws-lambda.Function.addEnvironment changed-type:@aws-cdk/aws-dynamodb.Table.tableStreamArn +incompatible-argument:@aws-cdk/aws-apigateway.LambdaRestApi.addModel +incompatible-argument:@aws-cdk/aws-apigateway.Model. +incompatible-argument:@aws-cdk/aws-apigateway.RestApi.addModel diff --git a/packages/@aws-cdk/aws-apigateway/lib/json-schema.ts b/packages/@aws-cdk/aws-apigateway/lib/json-schema.ts index 5c36190eca1ae..48b9035d3e1d3 100644 --- a/packages/@aws-cdk/aws-apigateway/lib/json-schema.ts +++ b/packages/@aws-cdk/aws-apigateway/lib/json-schema.ts @@ -63,7 +63,7 @@ export interface JsonSchema { readonly minProperties?: number; readonly required?: string[]; readonly properties?: { [name: string]: JsonSchema }; - readonly additionalProperties?: JsonSchema; + readonly additionalProperties?: boolean; readonly patternProperties?: { [name: string]: JsonSchema }; readonly dependencies?: { [name: string]: JsonSchema | string[] }; readonly propertyNames?: JsonSchema;