{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://bioregistry.io/schema.json",
  "title": "Bioregistry JSON Schema",
  "description": "The Bioregistry JSON Schema describes the shapes of the objects in the registry, metaregistry, collections, and their other related resources",
  "definitions": {
    "Author": {
      "title": "Author",
      "description": "Metadata for an author.",
      "type": "object",
      "properties": {
        "name": {
          "title": "Name",
          "description": "The full name of the author",
          "type": "string"
        },
        "orcid": {
          "title": "Open Researcher and Contributor Identifier",
          "description": "The ORCiD of the author",
          "type": "string"
        },
        "email": {
          "title": "Email",
          "description": "The email address specific to the author",
          "pattern": "^(\\w|\\.|\\_|\\-)+[@](\\w|\\_|\\-|\\.)+[.]\\w{2,5}$",
          "type": "string"
        },
        "github": {
          "title": "Github",
          "description": "The GitHub handle for the author",
          "type": "string"
        }
      },
      "required": [
        "name",
        "orcid"
      ]
    },
    "Collection": {
      "title": "Collection",
      "description": "A collection of resources.",
      "type": "object",
      "properties": {
        "identifier": {
          "title": "Identifier",
          "description": "The collection's identifier",
          "pattern": "^\\d{7}$",
          "type": "string"
        },
        "name": {
          "title": "Name",
          "description": "The name of the collection",
          "type": "string"
        },
        "description": {
          "title": "Description",
          "description": "A description of the collection",
          "type": "string"
        },
        "resources": {
          "title": "Resources",
          "description": "A list of prefixes of resources appearing in the collection",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "authors": {
          "title": "Authors",
          "description": "A list of authors/contributors to the collection",
          "type": "array",
          "items": {
            "$ref": "#/definitions/Author"
          }
        },
        "context": {
          "title": "Context",
          "type": "string"
        }
      },
      "required": [
        "identifier",
        "name",
        "description",
        "resources",
        "authors"
      ]
    },
    "Provider": {
      "title": "Provider",
      "description": "A provider.",
      "type": "object",
      "properties": {
        "code": {
          "title": "Code",
          "description": "A locally unique code within the prefix for the provider",
          "type": "string"
        },
        "name": {
          "title": "Name",
          "description": "Name of the provider",
          "type": "string"
        },
        "description": {
          "title": "Description",
          "description": "Description of the provider",
          "type": "string"
        },
        "homepage": {
          "title": "Homepage",
          "description": "Homepage of the provider",
          "type": "string"
        },
        "uri_format": {
          "title": "URI Format",
          "description": "The URI format string, which must have at least one ``$1`` in it",
          "type": "string"
        }
      },
      "required": [
        "code",
        "name",
        "description",
        "homepage",
        "uri_format"
      ]
    },
    "Attributable": {
      "title": "Attributable",
      "description": "An upper-level metadata for a person.",
      "type": "object",
      "properties": {
        "name": {
          "title": "Name",
          "description": "The full name of the author",
          "type": "string"
        },
        "orcid": {
          "title": "Open Researcher and Contributor Identifier",
          "description": "The ORCiD of the author",
          "type": "string"
        },
        "email": {
          "title": "Email",
          "description": "The email address specific to the author",
          "pattern": "^(\\w|\\.|\\_|\\-)+[@](\\w|\\_|\\-|\\.)+[.]\\w{2,5}$",
          "type": "string"
        },
        "github": {
          "title": "Github",
          "description": "The GitHub handle for the author",
          "type": "string"
        }
      },
      "required": [
        "name"
      ]
    },
    "Resource": {
      "title": "Resource",
      "description": "Metadata about an ontology, database, or other resource.",
      "type": "object",
      "properties": {
        "name": {
          "title": "Name",
          "description": "The human-readable name of the resource",
          "type": "string"
        },
        "description": {
          "title": "Description",
          "description": "A description of the resource",
          "type": "string"
        },
        "pattern": {
          "title": "Pattern",
          "description": "The regular expression pattern for identifiers in the resource",
          "type": "string"
        },
        "uri_format": {
          "title": "URI Format",
          "description": "The URI format string, which must have at least one ``$1`` in it",
          "type": "string"
        },
        "providers": {
          "title": "Providers",
          "description": "Additional, non-default providers for the resource",
          "type": "array",
          "items": {
            "$ref": "#/definitions/Provider"
          }
        },
        "homepage": {
          "title": "Homepage",
          "description": "The URL for the homepage of the resource, preferably with HTTPS",
          "type": "string"
        },
        "contact": {
          "title": "Contact",
          "description": "The contact email address for the resource. This must correspond to a specific person and not be a listserve nor a shared email account.",
          "allOf": [
            {
              "$ref": "#/definitions/Attributable"
            }
          ]
        },
        "example": {
          "title": "Example",
          "description": "An example local identifier for the resource, explicitly excluding any redundant usage of the prefix in the identifier. For example, a GO identifier should only look like 1234567 and not like GO:1234567",
          "type": "string"
        },
        "license": {
          "title": "License",
          "description": "The license for the resource",
          "type": "string"
        },
        "version": {
          "title": "Version",
          "description": "The version for the resource",
          "type": "string"
        },
        "part_of": {
          "title": "Part Of",
          "description": "An annotation between this prefix and a super-prefix. For example, ``chembl.compound`` is a part of ``chembl``.",
          "type": "string"
        },
        "provides": {
          "title": "Provides",
          "description": "An annotation between this prefix and a prefix for which it is redundant. For example, ``ctd.gene`` has been given a prefix by Identifiers.org, but it actually just reuses identifies from ``ncbigene``, so ``ctd.gene`` provides ``ncbigene``.",
          "type": "string"
        },
        "download_owl": {
          "title": "OWL Download URL",
          "description": "The OWL download URL, preferably an unversioned variant",
          "type": "string"
        },
        "download_obo": {
          "title": "OBO Download URL",
          "description": "The OBO download URL, preferably an unversioned variant",
          "type": "string"
        },
        "banana": {
          "title": "Banana",
          "description": "The redundant prefix that may appear in identifiers (e.g., `FBbt:`)",
          "type": "string"
        },
        "deprecated": {
          "title": "Deprecated",
          "description": "A flag to note if this resource is deprecated - will override OLS, OBO Foundry, and Prefix Commons flags.",
          "type": "boolean"
        },
        "mappings": {
          "title": "Mappings",
          "description": "A dictionary of metaprefixes to prefixes in external registries",
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "synonyms": {
          "title": "Synonyms",
          "description": "A list of synonyms for the prefix of this resource",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "references": {
          "title": "References",
          "description": "A list of URLs to also see, such as publications describing the resource",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "appears_in": {
          "title": "Appears In",
          "description": "A list of prefixes that use this resource for xrefs, provenance, etc.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "depends_on": {
          "title": "Depends On",
          "description": "A list of prefixes that use this resource depends on, e.g., ontologies that import each other.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "namespace_in_lui": {
          "title": "Namespace Embedded in Local Unique Identifier",
          "description": "A way to override MIRIAM's namespaceEmbeddedInLui",
          "type": "boolean"
        },
        "no_own_terms": {
          "title": "No Own Terms",
          "description": "A flag to denote if the resource does not have any identifiers itself",
          "type": "boolean"
        },
        "comment": {
          "title": "Comment",
          "description": "A field for a free text comment",
          "type": "string"
        },
        "contributor": {
          "title": "Contributor",
          "description": "Contributor information, including the name, ORCiD, and optionally the email of the contributor",
          "allOf": [
            {
              "$ref": "#/definitions/Author"
            }
          ]
        },
        "reviewer": {
          "title": "Reviewer",
          "description": "Reviewer information, including the name, ORCiD, and optionally the email of the reviewer",
          "allOf": [
            {
              "$ref": "#/definitions/Author"
            }
          ]
        },
        "proprietary": {
          "title": "Proprietary",
          "description": "Set to true if this database is proprietary. If missing, assume it's not.",
          "type": "boolean"
        },
        "has_canonical": {
          "title": "Has Canonical",
          "description": "If this shares an IRI with another entry, maps to which should be be considered as canonical",
          "type": "string"
        },
        "preferred_prefix": {
          "title": "Preferred Prefix",
          "description": "An annotation of stylization of the prefix. This appears in OBO ontologies like FBbt as well as databases like NCBIGene. If it's not given, then assume that the normalized prefix used in the Bioregistry is canonical.",
          "type": "string"
        },
        "miriam": {
          "title": "Miriam",
          "type": "object"
        },
        "n2t": {
          "title": "N2T",
          "type": "object"
        },
        "prefixcommons": {
          "title": "Prefixcommons",
          "type": "object"
        },
        "wikidata": {
          "title": "Wikidata",
          "type": "object"
        },
        "go": {
          "title": "Go",
          "type": "object"
        },
        "obofoundry": {
          "title": "Obofoundry",
          "type": "object"
        },
        "bioportal": {
          "title": "Bioportal",
          "type": "object"
        },
        "ols": {
          "title": "Ols",
          "type": "object"
        },
        "ncbi": {
          "title": "Ncbi",
          "type": "object"
        },
        "uniprot": {
          "title": "Uniprot",
          "type": "object"
        },
        "biolink": {
          "title": "Biolink",
          "type": "object"
        },
        "cellosaurus": {
          "title": "Cellosaurus",
          "type": "object"
        },
        "ontobee": {
          "title": "Ontobee",
          "type": "object"
        },
        "cheminf": {
          "title": "Cheminf",
          "type": "object"
        },
        "fairsharing": {
          "title": "Fairsharing",
          "type": "object"
        }
      }
    },
    "RegistrySchema": {
      "title": "RegistrySchema",
      "description": "Metadata about a registry's schema.",
      "type": "object",
      "properties": {
        "name": {
          "title": "Name",
          "anyOf": [
            {
              "const": "required",
              "type": "string"
            },
            {
              "const": "required*",
              "type": "string"
            },
            {
              "const": "present",
              "type": "string"
            },
            {
              "const": "present*",
              "type": "string"
            },
            {
              "const": "missing",
              "type": "string"
            },
            {
              "const": "irrelevant",
              "type": "string"
            },
            {
              "const": "irrelevant*",
              "type": "string"
            }
          ]
        },
        "homepage": {
          "title": "Homepage",
          "anyOf": [
            {
              "const": "required",
              "type": "string"
            },
            {
              "const": "required*",
              "type": "string"
            },
            {
              "const": "present",
              "type": "string"
            },
            {
              "const": "present*",
              "type": "string"
            },
            {
              "const": "missing",
              "type": "string"
            },
            {
              "const": "irrelevant",
              "type": "string"
            },
            {
              "const": "irrelevant*",
              "type": "string"
            }
          ]
        },
        "description": {
          "title": "Description",
          "anyOf": [
            {
              "const": "required",
              "type": "string"
            },
            {
              "const": "required*",
              "type": "string"
            },
            {
              "const": "present",
              "type": "string"
            },
            {
              "const": "present*",
              "type": "string"
            },
            {
              "const": "missing",
              "type": "string"
            },
            {
              "const": "irrelevant",
              "type": "string"
            },
            {
              "const": "irrelevant*",
              "type": "string"
            }
          ]
        },
        "example": {
          "title": "Example",
          "anyOf": [
            {
              "const": "required",
              "type": "string"
            },
            {
              "const": "required*",
              "type": "string"
            },
            {
              "const": "present",
              "type": "string"
            },
            {
              "const": "present*",
              "type": "string"
            },
            {
              "const": "missing",
              "type": "string"
            },
            {
              "const": "irrelevant",
              "type": "string"
            },
            {
              "const": "irrelevant*",
              "type": "string"
            }
          ]
        },
        "pattern": {
          "title": "Pattern",
          "anyOf": [
            {
              "const": "required",
              "type": "string"
            },
            {
              "const": "required*",
              "type": "string"
            },
            {
              "const": "present",
              "type": "string"
            },
            {
              "const": "present*",
              "type": "string"
            },
            {
              "const": "missing",
              "type": "string"
            },
            {
              "const": "irrelevant",
              "type": "string"
            },
            {
              "const": "irrelevant*",
              "type": "string"
            }
          ]
        },
        "provider": {
          "title": "Provider",
          "anyOf": [
            {
              "const": "required",
              "type": "string"
            },
            {
              "const": "required*",
              "type": "string"
            },
            {
              "const": "present",
              "type": "string"
            },
            {
              "const": "present*",
              "type": "string"
            },
            {
              "const": "missing",
              "type": "string"
            },
            {
              "const": "irrelevant",
              "type": "string"
            },
            {
              "const": "irrelevant*",
              "type": "string"
            }
          ]
        },
        "alternate_providers": {
          "title": "Alternate Providers",
          "anyOf": [
            {
              "const": "required",
              "type": "string"
            },
            {
              "const": "required*",
              "type": "string"
            },
            {
              "const": "present",
              "type": "string"
            },
            {
              "const": "present*",
              "type": "string"
            },
            {
              "const": "missing",
              "type": "string"
            },
            {
              "const": "irrelevant",
              "type": "string"
            },
            {
              "const": "irrelevant*",
              "type": "string"
            }
          ]
        },
        "synonyms": {
          "title": "Synonyms",
          "anyOf": [
            {
              "const": "required",
              "type": "string"
            },
            {
              "const": "required*",
              "type": "string"
            },
            {
              "const": "present",
              "type": "string"
            },
            {
              "const": "present*",
              "type": "string"
            },
            {
              "const": "missing",
              "type": "string"
            },
            {
              "const": "irrelevant",
              "type": "string"
            },
            {
              "const": "irrelevant*",
              "type": "string"
            }
          ]
        },
        "license": {
          "title": "License",
          "anyOf": [
            {
              "const": "required",
              "type": "string"
            },
            {
              "const": "required*",
              "type": "string"
            },
            {
              "const": "present",
              "type": "string"
            },
            {
              "const": "present*",
              "type": "string"
            },
            {
              "const": "missing",
              "type": "string"
            },
            {
              "const": "irrelevant",
              "type": "string"
            },
            {
              "const": "irrelevant*",
              "type": "string"
            }
          ]
        },
        "version": {
          "title": "Version",
          "anyOf": [
            {
              "const": "required",
              "type": "string"
            },
            {
              "const": "required*",
              "type": "string"
            },
            {
              "const": "present",
              "type": "string"
            },
            {
              "const": "present*",
              "type": "string"
            },
            {
              "const": "missing",
              "type": "string"
            },
            {
              "const": "irrelevant",
              "type": "string"
            },
            {
              "const": "irrelevant*",
              "type": "string"
            }
          ]
        },
        "contact": {
          "title": "Contact",
          "anyOf": [
            {
              "const": "required",
              "type": "string"
            },
            {
              "const": "required*",
              "type": "string"
            },
            {
              "const": "present",
              "type": "string"
            },
            {
              "const": "present*",
              "type": "string"
            },
            {
              "const": "missing",
              "type": "string"
            },
            {
              "const": "irrelevant",
              "type": "string"
            },
            {
              "const": "irrelevant*",
              "type": "string"
            }
          ]
        },
        "search": {
          "title": "Search",
          "description": "Does this resource have a search functionality for prefixes",
          "type": "boolean"
        },
        "fair": {
          "title": "Fair",
          "description": "Does this resource provide a structured dump of the data is easily findable, accessible, and in a structured format in bulk",
          "type": "boolean"
        },
        "fair_note": {
          "title": "Fair Note",
          "description": "Explanation for why data isn't FAIR",
          "type": "string"
        }
      },
      "required": [
        "name",
        "homepage",
        "description",
        "example",
        "pattern",
        "provider",
        "alternate_providers",
        "synonyms",
        "license",
        "version",
        "contact",
        "search",
        "fair"
      ]
    },
    "Registry": {
      "title": "Registry",
      "description": "Metadata about a registry.",
      "type": "object",
      "properties": {
        "prefix": {
          "title": "Prefix",
          "description": "The metaprefix for the registry itself. For example, the metaprefix for Identifiers.org is `miriam`.",
          "type": "string"
        },
        "name": {
          "title": "Name",
          "description": "The human-readable label for the registry",
          "type": "string"
        },
        "description": {
          "title": "Description",
          "description": "A full description of the registry.",
          "type": "string"
        },
        "homepage": {
          "title": "Homepage",
          "description": "The URL for the homepage of the registry.",
          "type": "string"
        },
        "example": {
          "title": "Example",
          "description": "An example prefix inside the registry.",
          "type": "string"
        },
        "availability": {
          "title": "Availability",
          "description": "A structured description of the metadata that the registry collects",
          "allOf": [
            {
              "$ref": "#/definitions/RegistrySchema"
            }
          ]
        },
        "download": {
          "title": "Download",
          "description": "A download link for the data contained in the registry",
          "type": "string"
        },
        "provider_uri_format": {
          "title": "Provider Uri Format",
          "type": "string"
        },
        "resolver_uri_format": {
          "title": "Resolver Uri Format",
          "type": "string"
        },
        "resolver_type": {
          "title": "Resolver Type",
          "type": "string"
        },
        "contact": {
          "title": "Contact",
          "description": "The contact for the registry.",
          "allOf": [
            {
              "$ref": "#/definitions/Attributable"
            }
          ]
        },
        "bioregistry_prefix": {
          "title": "Bioregistry Prefix",
          "type": "string"
        }
      },
      "required": [
        "prefix",
        "name",
        "description",
        "homepage",
        "example",
        "availability",
        "contact"
      ]
    }
  }
}