Wikidata · Schema

PatchRequest

PatchRequest schema from Wikidata REST API & MediaWiki API

Knowledge GraphLinked DataOpen DataSemantic WebSPARQLWikipedia

Properties

Name Type Description
patch array JSON Patch operations (RFC 6902)
comment string Edit summary
tags array Change tags to apply
bot boolean
View JSON Schema on GitHub

JSON Schema

wikidata-patch--request-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/wikidata/refs/heads/main/json-schema/wikidata-patch--request-schema.json",
  "title": "PatchRequest",
  "description": "PatchRequest schema from Wikidata REST API & MediaWiki API",
  "type": "object",
  "properties": {
    "patch": {
      "type": "array",
      "description": "JSON Patch operations (RFC 6902)",
      "items": {
        "type": "object",
        "required": [
          "op",
          "path"
        ],
        "properties": {
          "op": {
            "type": "string",
            "enum": [
              "add",
              "remove",
              "replace",
              "move",
              "copy",
              "test"
            ]
          },
          "path": {
            "type": "string"
          },
          "value": {
            "description": "New value for add/replace operations"
          },
          "from": {
            "type": "string",
            "description": "Source path for move/copy operations"
          }
        }
      }
    },
    "comment": {
      "type": "string",
      "description": "Edit summary"
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Change tags to apply"
    },
    "bot": {
      "type": "boolean",
      "default": false
    }
  },
  "required": [
    "patch"
  ]
}