Skip to content

Commit 040af1b

Browse files
jusdinoiankhou
authored andcommitted
fix(apigateway): correct JsonSchema.additionalItems property type (#33879)
### Issue #33878 Closes #33878. ### Reason for this change Fix a bug in the JsonSchema interface. :rotating_light: _This is a breaking change, but should be acceptable, since the bug prevented use of the changed interface portion_ :rotating_light: ### Description of changes Changing the `JsonSchema.additionalItems` type from `JsonSchema[]` to `JsonSchema | boolean` to match [Json Schema Draft-04](https://json-schema.org/draft-04/schema). This enables deployment of API Gateway models that include the `additionalItems` property. ### Describe any new or updated permissions being added None ### Description of how you validated changes Added an integration test to validate that it fixes the deployment issue. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 72ff0dc commit 040af1b

12 files changed

+692
-1
lines changed

allowed-breaking-changes.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -957,3 +957,7 @@ weakened:aws-cdk-lib.cx_api.MetadataEntryResult
957957
strengthened:aws-cdk-lib.aws_eks.ClusterProps
958958
strengthened:aws-cdk-lib.aws_eks.FargateClusterProps
959959
removed:aws-cdk-lib.lambda_layer_kubectl.KubectlLayer
960+
961+
# Fixing the JsonSchema interface to be consistent with JSON Schema spec
962+
changed-type:aws-cdk-lib.aws_apigateway.JsonSchema.additionalItems
963+
strengthened:aws-cdk-lib.aws_apigateway.JsonSchema

packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.model-schema-additional-items.js.snapshot/ModelSchemaAdditionalItemsTestDefaultTestDeployAssert81CF581B.assets.json

Lines changed: 19 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.model-schema-additional-items.js.snapshot/ModelSchemaAdditionalItemsTestDefaultTestDeployAssert81CF581B.template.json

Lines changed: 36 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.model-schema-additional-items.js.snapshot/cdk.out

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.model-schema-additional-items.js.snapshot/integ.json

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.model-schema-additional-items.js.snapshot/manifest.json

Lines changed: 288 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.model-schema-additional-items.js.snapshot/model-schema-additional-items-test.assets.json

Lines changed: 19 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)