{
  "$id": "https://firefox-ci-tc.services.mozilla.com/schemas/common/metadata-metaschema.json#",
  "$schema": "https://firefox-ci-tc.services.mozilla.com/schemas/common/metaschema.json#",
  "allOf": [
    {
      "$ref": "./metaschema.json#"
    },
    {
      "$ref": "#/definitions/topLevelMetadata"
    }
  ],
  "definitions": {
    "topLevelMetadata": {
      "additionalProperties": true,
      "properties": {
        "metadata": {
          "additionalProperties": false,
          "description": "Metadata identifying the documents that the schema document describes,\ngiving both a name (a category of document) and a version (to allow\nseveral versions of the same category).  Consumers of the documents can\nconsult the schema metadata to determine how to process the document.\n\nAny changes to a schema that require changes to consumers of the described\ndocuments should be accompanied by a version increase.\n",
          "properties": {
            "name": {
              "description": "This is used to identify the category of document for later consumption.\nIt is also used to determine schema id's.  Common values for Taskcluster\nreferences are `manifest`, `exchanges`, and `api`.\n",
              "title": "Name of the document category",
              "type": "string"
            },
            "version": {
              "title": "Version of the document format",
              "type": "integer"
            }
          },
          "required": [
            "version",
            "name"
          ],
          "title": "Metadata for this schema",
          "type": "object"
        }
      },
      "required": [
        "metadata"
      ],
      "type": "object"
    }
  },
  "description": "This is a refinement of the Taskcluster metaschema, with the following changes:\n\n  * top level must be an object (no trivial true or false schemas)\n  * `{metadata: {name, version}}` must be present at the top level\n\nNote that any schema that validates against this metaschema will also\nvalidate against the upstream draft-06 metaschema, and is usable by any\nJSON-schema tool.\n",
  "title": "JSON-Schema Meta-Schema, with the addition of a `metadata` property"
}