{
  "title": "ListItem",
  "@id": "schema:ListItem",
  "extends": "Thing",
  "role": "tertiary",
  "status": "stable",
  "category": "text",
  "description": "A single item in a list.",
  "$comment": "This is an implementation, and extension, of schema.org [`ListItem`](https://schema.org/ListItem).\nIt extends schema.ord `ListItem` by adding `content` and `isChecked` properties.\n\nAnalogues of `ListItem` in other schema include:\n  - JATS XML `<list-item>`](https://jats.nlm.nih.gov/articleauthoring/tag-library/1.2/element/list-item.html)\n  - HTML [`<li>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/li)\n  - MDAST [`ListItem`](https://github.com/syntax-tree/mdast#listitem)\n  - OpenDocument [`<text:list-item>`](http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.html#__RefHeading__1415154_253892949)\n",
  "properties": {
    "type": {
      "@id": "schema:type",
      "description": "The name of the type.",
      "type": "string",
      "enum": [
        "ListItem"
      ],
      "default": "ListItem",
      "from": "Entity"
    },
    "id": {
      "@id": "schema:id",
      "description": "The identifier for this item.",
      "type": "string",
      "from": "Entity"
    },
    "meta": {
      "@id": "stencila:meta",
      "description": "Metadata associated with this item.",
      "type": "object",
      "from": "Entity"
    },
    "alternateNames": {
      "@id": "schema:alternateName",
      "description": "Alternate names (aliases) for the item.",
      "type": "array",
      "items": {
        "type": "string"
      },
      "from": "Thing",
      "isArray": true,
      "isPlural": true,
      "aliases": [
        "alternateName"
      ]
    },
    "description": {
      "@id": "schema:description",
      "description": "A description of the item.",
      "$comment": "Allows for the description to be an array of nodes (e.g. an array of inline content,\nor a couple of paragraphs), or a string. The `minItems` restriction avoids a string\nbeing coerced into an array with a single string item.\n",
      "anyOf": [
        {
          "type": "array",
          "items": {
            "$ref": "BlockContent.schema.json"
          }
        },
        {
          "type": "array",
          "items": {
            "$ref": "InlineContent.schema.json"
          },
          "minItems": 2
        },
        {
          "type": "string"
        }
      ],
      "from": "Thing"
    },
    "identifiers": {
      "@id": "schema:identifier",
      "description": "Any kind of identifier for any kind of Thing.",
      "$comment": "Some identifiers have specific properties e.g the `issn` property for\nthe `Periodical` type. These should be used in preference to this\nproperty which is intended for identifiers that do not yet have a\nspecific property. Identifiers can be represented as strings, but\nusing a `PropertyValue` will usually be better because it allows\nfor `propertyID` (i.e. the type of identifier).\n",
      "type": "array",
      "items": {
        "anyOf": [
          {
            "$ref": "PropertyValue.schema.json"
          },
          {
            "type": "string"
          }
        ]
      },
      "from": "Thing",
      "isArray": true,
      "isPlural": true,
      "aliases": [
        "identifier"
      ]
    },
    "images": {
      "@id": "schema:image",
      "description": "Images of the item.",
      "type": "array",
      "items": {
        "anyOf": [
          {
            "$ref": "ImageObject.schema.json"
          },
          {
            "type": "string",
            "format": "uri"
          }
        ]
      },
      "from": "Thing",
      "isArray": true,
      "isPlural": true,
      "aliases": [
        "image"
      ]
    },
    "name": {
      "@id": "schema:name",
      "description": "The name of the item.",
      "type": "string",
      "from": "Thing"
    },
    "url": {
      "@id": "schema:url",
      "description": "The URL of the item.",
      "type": "string",
      "format": "uri",
      "from": "Thing"
    },
    "content": {
      "@id": "stencila:content",
      "description": "The content of the list item.",
      "$comment": "Use either `content` or `item`, not both.",
      "type": "array",
      "items": {
        "$ref": "Node.schema.json"
      },
      "from": "ListItem",
      "isArray": true
    },
    "isChecked": {
      "@id": "stencila:isChecked",
      "description": "A flag to indicate if this list item is checked.",
      "type": "boolean",
      "default": false,
      "from": "ListItem"
    },
    "item": {
      "@id": "schema:item",
      "description": "The item represented by this list item.",
      "$comment": "Use either `item` or `content`, not both.",
      "allOf": [
        {
          "$ref": "Node.schema.json"
        }
      ],
      "from": "ListItem"
    },
    "position": {
      "@id": "schema:position",
      "description": "The position of the item in a series or sequence of items.",
      "type": "number",
      "from": "ListItem"
    }
  },
  "examples": [
    {
      "type": "ListItem",
      "content": [
        "List Item Content"
      ]
    },
    {
      "type": "ListItem",
      "content": [
        "List Item Content",
        {
          "type": "List",
          "order": "ordered",
          "items": [
            "Nested Item One"
          ]
        }
      ]
    },
    {
      "type": "ListItem",
      "isChecked": true,
      "content": [
        "Completed todo item"
      ]
    }
  ],
  "file": "ListItem.schema.yaml",
  "children": [],
  "descendants": [],
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://schema.stenci.la/v1/ListItem.schema.json",
  "source": "https://github.com/stencila/schema/blob/master/schema/ListItem.schema.yaml",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "type"
  ],
  "propertyAliases": {
    "alternateName": "alternateNames",
    "identifier": "identifiers",
    "image": "images"
  }
}
