Skip to content

Commit 7345d4f

Browse files
committed
Allow * in `mayContainType
1 parent 1f99426 commit 7345d4f

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

packages/optimizely-cms-cli/src/utils/mapping.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,13 @@ export function parseChildContentType(
2525
const duplicates: string[] = [];
2626
const normalized = mayContainTypes.map((entry: any) => {
2727
const key = extractKeyName(entry, parentKey);
28-
// Do not allow keys that start with '_' to be validated against allowedKeys
29-
if (!key.startsWith('_') && allowedKeys && !allowedKeys.has(key)) {
28+
if (
29+
key !== '*' &&
30+
// Do not allow keys that start with '_' to be validated against allowedKeys
31+
!key.startsWith('_') &&
32+
allowedKeys &&
33+
!allowedKeys.has(key)
34+
) {
3035
invalid.push(key);
3136
}
3237
if (seen.has(key)) {

0 commit comments

Comments
 (0)