{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "$id": "https://schema.humancellatlas.org/core/1.1.1/links",
  "description": "A schema for a links bundle.",
  "additionalProperties": false,
  "required": [
    "describedBy",
    "schema_type"
  ],
  "title": "links",
  "type": "object",
  "definitions": {
    "bundle_links": {
      "type": "object",
      "properties": {
        "source_type": {
          "description": "The type of the entity this link starts from",
          "type": "string"
        },
        "source_id": {
          "description": "The id of the entity this link starts from",
          "type": "string"
        },
        "destination_type": {
          "description": "The type of the entity this link goes to",
          "type": "string"
        },
        "destination_id": {
          "description": "The id  of the entity this link goes to",
          "type": "string"
        }
      }
    }
  },
  "properties": {
    "describedBy": {
      "description": "The URL reference to the schema.",
      "type": "string",
      "pattern": "^(http|https)://schema.(.*?)humancellatlas.org/core/(([0-9]{1,}.[0-9]{1,}.[0-9]{1,})|([a-zA-Z]*?))/links"
    },
    "schema_version": {
      "description": "The version number of the schema in major.minor.patch format.",
      "type": "string",
      "pattern": "^[0-9]{1,}.[0-9]{1,}.[0-9]{1,}$"
    },
    "schema_type": {
      "description": "The type of the metadata schema entity.",
      "type": "string",
      "enum": [
        "link_bundle"
      ]
    },
    "links": {
      "description": "An array of linking objects",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "https://schema.humancellatlas.org/core/1.1.1/links#/definitions/bundle_links"
      }
    }
  }
}
