{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/wikimedia/json-schema/wikimedia-structured-content-schema.json",
  "title": "structured-content",
  "x-generated": "2026-11-08",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/wikimedia-structured-contents-api-openapi.yml#/components/schemas/structured-content",
  "properties": {
    "name": {
      "type": "string"
    },
    "identifier": {
      "type": "integer"
    },
    "abstract": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "url": {
      "type": "string"
    },
    "date_created": {
      "type": "string"
    },
    "date_modified": {
      "type": "string"
    },
    "infoboxes": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/part"
      }
    },
    "sections": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/part"
      }
    },
    "main_entity": {
      "$ref": "#/$defs/entity"
    },
    "additional_entities": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/entity"
      }
    },
    "image": {
      "$ref": "#/$defs/image"
    },
    "version": {
      "$ref": "#/$defs/version"
    },
    "is_part_of": {
      "$ref": "#/$defs/project"
    },
    "in_language": {
      "$ref": "#/$defs/language"
    },
    "license": {
      "$ref": "#/$defs/license"
    },
    "references": {
      "$ref": "#/$defs/reference"
    },
    "tables": {
      "$ref": "#/$defs/table"
    }
  },
  "type": "object",
  "$defs": {
    "citation": {
      "type": "object",
      "properties": {
        "identifier": {
          "type": "string"
        },
        "group": {
          "type": "string"
        },
        "text": {
          "type": "string"
        }
      }
    },
    "editor": {
      "properties": {
        "date_started": {
          "type": "string"
        },
        "edit_count": {
          "type": "integer"
        },
        "groups": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "identifier": {
          "type": "integer"
        },
        "is_anonymous": {
          "type": "boolean"
        },
        "is_bot": {
          "type": "boolean"
        },
        "name": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "entity": {
      "type": "object",
      "properties": {
        "identifier": {
          "type": "string"
        },
        "url": {
          "type": "string"
        }
      }
    },
    "image": {
      "type": "object",
      "properties": {
        "content_url": {
          "description": "Image URL",
          "format": "uri",
          "type": "string"
        },
        "identifier": {
          "type": "string",
          "format": "uuid",
          "description": "Unique identifier for the image"
        },
        "name": {
          "type": "string",
          "description": "Filename of the image"
        },
        "width": {
          "description": "image width in pixels",
          "type": "integer"
        },
        "height": {
          "description": "image height in pixels",
          "type": "integer"
        },
        "thumbnail": {
          "$ref": "#/$defs/thumbnail"
        },
        "caption": {
          "type": "string",
          "description": "caption describing the image"
        },
        "alternative_text": {
          "type": "string",
          "description": "Alternative text description of the image for accessibility"
        },
        "encoding_format": {
          "type": "string",
          "format": "mime_type",
          "description": "MIME type or encoding format of the image, constructed from the url"
        },
        "media_type": {
          "type": "string",
          "enum": "unknown, bitmap, drawing, audio, video, multimedia, office, text, executable, archive",
          "description": "Mediawiki media type of the image"
        }
      }
    },
    "language": {
      "type": "object",
      "properties": {
        "identifier": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "alternate_name": {
          "type": "string"
        },
        "direction": {
          "type": "string"
        }
      }
    },
    "license": {
      "type": "object",
      "properties": {
        "identifier": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "url": {
          "type": "string"
        }
      }
    },
    "link": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string"
        },
        "text": {
          "type": "string"
        },
        "images": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/image"
          }
        }
      }
    },
    "maintenance_tags": {
      "properties": {
        "citation_needed_count": {
          "type": "integer"
        },
        "pov_count": {
          "type": "integer"
        },
        "clarification_needed_count": {
          "type": "integer"
        },
        "update_count": {
          "type": "integer"
        }
      },
      "type": "object"
    },
    "part": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "value": {
          "type": "string"
        },
        "values": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "has_parts": {
          "type": "array",
          "items": {
            "type": "object"
          }
        },
        "images": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/image"
          }
        },
        "links": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/link"
          }
        },
        "citations": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/citation"
          }
        }
      }
    },
    "project": {
      "type": "object",
      "properties": {
        "identifier": {
          "type": "string"
        },
        "code": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "url": {
          "type": "string"
        },
        "in_language": {
          "$ref": "#/$defs/language"
        }
      }
    },
    "reference": {
      "type": "object",
      "properties": {
        "identifier": {
          "type": "string"
        },
        "group": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "metadata": {
          "type": "object"
        },
        "text": {
          "type": "object",
          "properties": {
            "value": {
              "type": "string"
            },
            "links": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/link"
              }
            }
          }
        },
        "source": {
          "type": "object",
          "properties": {
            "value": {
              "type": "string"
            },
            "links": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/link"
              }
            }
          }
        },
        "parent_reference": {
          "type": "string"
        }
      }
    },
    "referenceneed": {
      "properties": {
        "reference_need_score": {
          "type": "number"
        }
      },
      "type": "object"
    },
    "referencerisk": {
      "properties": {
        "reference_risk_score": {
          "type": "number"
        }
      },
      "type": "object"
    },
    "revertrisk": {
      "properties": {
        "prediction": {
          "type": "boolean"
        },
        "probability": {
          "properties": {
            "false": {
              "type": "number"
            },
            "true": {
              "type": "number"
            }
          },
          "type": "object"
        }
      },
      "type": "object"
    },
    "scores": {
      "properties": {
        "revertrisk": {
          "$ref": "#/$defs/revertrisk"
        },
        "referencerisk": {
          "$ref": "#/$defs/referencerisk"
        },
        "referenceneed": {
          "$ref": "#/$defs/referenceneed"
        }
      },
      "type": "object"
    },
    "table": {
      "type": "object",
      "properties": {
        "identifier": {
          "type": "string"
        },
        "headers": {
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "value": {
                  "type": "string"
                }
              }
            }
          }
        },
        "rows": {
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "value": {
                  "type": "string"
                }
              }
            }
          }
        },
        "confidence_score": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        }
      }
    },
    "thumbnail": {
      "type": "object",
      "properties": {
        "contentUrl": {
          "type": "string",
          "format": "uri",
          "description": "Thumbnail URL"
        },
        "width": {
          "description": "Thumbnail width in pixels",
          "type": "integer"
        },
        "height": {
          "description": "Thumbnail height in pixels",
          "type": "integer"
        }
      }
    },
    "version": {
      "properties": {
        "comment": {
          "type": "string"
        },
        "editor": {
          "$ref": "#/$defs/editor"
        },
        "identifier": {
          "type": "integer"
        },
        "is_flagged_stable": {
          "type": "boolean"
        },
        "is_minor_edit": {
          "type": "boolean"
        },
        "noindex": {
          "type": "boolean"
        },
        "scores": {
          "$ref": "#/$defs/scores"
        },
        "maintenance_tags": {
          "$ref": "#/$defs/maintenance_tags"
        },
        "tags": {
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "type": "object"
    }
  }
}