☁️ Loving our new documentation website? Provide feedback in the CloudCannon Community! ✨

allowed_keys

Table of contents

Description:

This key defines a limited set of key names for nested keys within your Object Input.

The value is an array of key name strings. This affects entries when adding or renaming nested keys.

This set is used when entries are added and renamed with allow_create enabled. Has no effect if allow_create is not enabled.

Available for Mutable Objects only.

By default, this key is [].

Appears in:
└── _inputs
    └── *
        └── Object Input
            └── options
                └── entries
                    └── allowed_keys
Type:
Array<allowed_keys[*]>
Items:
[*]string#

This key represents an individual allowed key string in the _inputs.*(object-input).options.entries.allowed_keys array.

The value is a string that specifies a key name that can exist on the data within an Object Input. This set is used when entries are added and renamed with allow_create enabled.

Show examplesHide examples

In this example, we have configured an allowed key name for entries in a mutable Object Input.

Copied to clipboard
_inputs:
  metadata:
    type: object
    options:
      allow_create: true
      entries:
        allowed_keys:
          - title
{
  "_inputs": {
    "metadata": {
      "type": "object",
      "options": {
        "allow_create": true,
        "entries": {
          "allowed_keys": [
            "title"
          ]
        }
      }
    }
  }
}
Examples:

In this example, we have configured an allowed key name for entries in a mutable Object Input.

Copied to clipboard
_inputs:
  metadata:
    type: object
    options:
      allow_create: true
      entries:
        allowed_keys:
          - title
{
  "_inputs": {
    "metadata": {
      "type": "object",
      "options": {
        "allow_create": true,
        "entries": {
          "allowed_keys": [
            "title"
          ]
        }
      }
    }
  }
}
Open in a new tab