Wikimedia · Schema

media_item

Schema for media_item from the Wikimedia REST API

WikipediaWikimediaEncyclopediaOpen KnowledgeContentSearchReference

Properties

Name Type Description
title string The file page title
type string
section_id integer section ID in which the item is found on the page
showInGallery boolean whether the client should show the file in an image gallery presentation
caption object
original object reference to a Mathoid-rendered math formula image
View JSON Schema on GitHub

JSON Schema

media_item.json Raw ↑
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://raw.githubusercontent.com/api-evangelist/wikimedia/refs/heads/main/json-schema/media_item.json",
  "title": "media_item",
  "description": "Schema for media_item from the Wikimedia REST API",
  "type": "object",
  "properties": {
    "title": {
      "type": "string",
      "description": "The file page title"
    },
    "type": {
      "type": "string",
      "enum": [
        "image",
        "video",
        "audio"
      ]
    },
    "section_id": {
      "type": "integer",
      "description": "section ID in which the item is found on the page"
    },
    "showInGallery": {
      "type": "boolean",
      "description": "whether the client should show the file in an image gallery presentation"
    },
    "caption": {
      "type": "object",
      "properties": {
        "html": {
          "type": "string",
          "description": "on-wiki caption for the media item, including all HTML markup"
        },
        "text": {
          "type": "string",
          "description": "plain text of the on-wiki caption for the media item"
        }
      }
    },
    "original": {
      "type": "object",
      "description": "reference to a Mathoid-rendered math formula image",
      "properties": {
        "source": {
          "type": "string",
          "description": "Mathoid image render URL"
        },
        "mime": {
          "type": "string",
          "description": "the Mathoid image mime type"
        }
      }
    }
  },
  "required": [
    "type",
    "section_id",
    "showInGallery"
  ]
}