You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/cfn-schema-specification.md
+27-1Lines changed: 27 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -52,6 +52,10 @@ _enum_ is used to restrict a value to a fixed set of values. [JSON Schema docs](
52
52
53
53
_pattern_ keyword is used to validate a string against a regular expression. [JSON Schema docs](https://json-schema.org/understanding-json-schema/reference/string#regexp)
54
54
55
+
##### enumCaseInsensitive
56
+
57
+
_enumCaseInsensitive_ is similar to _enum_ but performs case-insensitive matching for string values. This is useful for validating against values where case doesn't matter, such as certain AWS service names or property values.
58
+
55
59
#### length
56
60
57
61
_minLength_ and _maxLength_ are used to are used to constrain the size of a string. [JSON Schema docs](https://json-schema.org/understanding-json-schema/reference/string#length)
@@ -73,6 +77,18 @@ _minItems_ and _maxItems_ is used to provide the inclusive length of an array.
73
77
74
78
_prefixItems_ is similar to the definition of [prefixItems](https://json-schema.org/understanding-json-schema/reference/array#tupleValidation) but doesn't actually do the prefix. The current resource schema doesn't support [items](https://json-schema.org/understanding-json-schema/reference/array#items) being an array. We use `prefixItems` to validate array items where ordering matters.
75
79
80
+
##### uniqueKeys
81
+
82
+
_uniqueKeys_ validates that array items have unique values for specified keys. This is useful for ensuring that collections of objects don't contain duplicates based on specific identifying properties.
83
+
84
+
```json
85
+
{
86
+
"uniqueKeys": ["id", "name"]
87
+
}
88
+
```
89
+
90
+
This ensures that no two objects in the array have the same combination of values for the specified keys.
91
+
76
92
#### Objects
77
93
78
94
##### properties
@@ -171,7 +187,17 @@ is equivalent to the JSON schema
171
187
172
188
##### dependentRequired
173
189
174
-
_dependentRequired_ has been backported into cfn-lint. You can read the definition [here](https://json-schema.org/understanding-json-schema/reference/conditionals#dependentRequired)
190
+
_dependentRequired_ has been backported into cfn-lint from JSON Schema 2019-09. It specifies that certain properties must be present if a given property is present.
191
+
192
+
```json
193
+
{
194
+
"dependentRequired": {
195
+
"credit_card": ["billing_address"]
196
+
}
197
+
}
198
+
```
199
+
200
+
This means that if the `credit_card` property is present, the `billing_address` property must also be present. You can read more about this keyword [here](https://json-schema.org/understanding-json-schema/reference/conditionals#dependentRequired).
0 commit comments