aws-cloudformation / aws-cloudformation/cloudformation-cli
"type" has to be singular by flattener code but can be an array by schema validation
- Dominant language
- Python
- Stars
- 336
- Forks
- 172
- Avg merge
- 3d 5m
- Merged PRs (30d)
- 3
Description
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.
```
{
"type": ["array", "object"],
"properties": {
"a": {}
},
"items": {
"properties": {
"b": {}
}
}
}
```
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
```json
{
"type": {
"anyOf": [
{ "$ref": "#/definitions/simpleTypes" },
{
"type": "array",
"items": { "$ref": "#/definitions/simpleTypes" },
"minItems": 1,
"uniqueItems": true
}
]
}
}
```
Contributor guide
Assessment
This issue has not been assessed yet.