---
canonical: https://amplience.com/developers/docs/schema-reference/schema-examples/core-concepts/lists/
title: Lists
description: This list schema snippet shows how to define lists in a content type schema using the array keyword, including lists of strings, images and content items.
  interactive: true
  - Schema examples
audience: Developer
date_published: 2022-07-01
date_modified: 2026-04-16
---

# Lists schema example

This schema example shows how to define different types of list in a content type schema using the `array` keyword, including lists of strings, images and content items.

- For each of properties we use the `minItems` and `maxItems` validation keywords to specify how many items can be added to the list. The type of content that can be added is defined by the `items` keyword.

- If you want to ensure that the user enters at least one value for a list set `minItems` to your required number of items and include the property in the `required` fields. See the `listOfStrings` property below for an example of how to do this.

- The listOfEnums property uses the `unique` keyword. This property allows the user to choose a list of values using pre-defined values. Each value can only be chosen once.

## Pre-requisites

This is a self contained example that you can modify to meet your own requirements.

## How to use

To use the `listOfContentItems` property, the media example must be registered (`https://schema-examples.com/media`). Alternatively you can modify `listOfContentItems` to include one of your own content types.

## Lists example schema

```json
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://schema-examples.com/lists",
  "title": "Title",
  "description": "Description",
  "allOf": [
    {
      "$ref": "http://bigcontent.io/cms/schema/v1/core#/definitions/content"
    }
  ],
  "type": "object",
  "properties": {
    "listOfStrings": {
      "$comment": "A list of up to 5 strings of between 5 and 20 characters. This property is required",
      "title": "String title",
      "description": "Enter a string value",
      "type": "array",
      "minItems": 1,
      "maxItems": 3,
      "items": {
        "type": "string",
        "minLength": 5,
        "maxLength": 20
      }
    },
    "listOfEnums": {
      "$comment": "A list of up to 3 values chosen from an enum. Each value must be unique",
      "title": "Values",
      "description": "Choose up to 3 values",
      "type": "array",
      "minItems": 0,
      "maxItems": 3,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "enum": [
          "Value one",
          "Value two",
          "Value three",
          "Value four",
          "Value five"
        ]
      }
    },
    "listOfImages": {
      "$comment": "A list of links to images in the user's media library",
      "title": "Images",
      "type": "array",
      "minItems": 0,
      "maxItems": 4,
      "items": {
        "allOf": [
          {
            "$ref": "http://bigcontent.io/cms/schema/v1/core#/definitions/image-link"
          }
        ]
      }
    },
    "listOfContentItems": {
      "$comment": "A list of links to media content items",
      "title": "Media list",
      "type": "array",
      "minItems": 0,
      "maxItems": 5,
      "items": {
        "allOf": [
          {
            "$ref": "http://bigcontent.io/cms/schema/v1/core#/definitions/content-link"
          },
          {
            "properties": {
              "contentType": {
                "enum": [
                  "https://schema-examples.com/media"
                ]
              }
            }
          }
        ]
      }
    }
  },
  "propertyOrder": [],
  "required": [
    "listOfStrings"
  ]
}
```

## Related Pages

[Validation](https://amplience.com/developers/docs/schema-reference/validation)

[Strings](https://amplience.com/developers/docs/schema-reference/data-types#strings)

[Media and content choosers](https://amplience.com/developers/docs/schema-reference/media)
