Open kddejong opened 4 months ago
Are there any existing types that do this?
Not if they are using the cloudformation-cli cause it would fail.
This shows up the most as a result of inline policies or definitions (like step functions).
"type": [
"object",
"string"
]
There are some other random multi types... none that specify array and objects together. In general the flattener is used in a lot of places in the cloudformation-cli and we make an assumption that we only support singular types.
This is to track if we should support multiple types or fix the code in cloudformation-cli to support multiple types. Right now the flatenner will fail when doing the following. Additionally the schema allows for multiple types.
https://github.com/aws-cloudformation/cloudformation-cli/blob/f0e376989c1b5a106c97b25b78e98f46bdb5995f/src/rpdk/core/jsonutils/flattener.py#L19-L23
Schema definition: https://github.com/aws-cloudformation/cloudformation-resource-schema/blob/master/src/main/resources/schema/schema#L145-L155