commonmeta 0.6.9

Library for conversions to/from the Commonmeta scholarly metadata format
Documentation
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "http://ror.org/schemas/v2.0/organization",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "admin": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "created": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "date": {
              "type": "string",
              "format": "date"
            },
            "schema_version": {
              "type": "string",
              "enum": [
                "1.0",
                "2.0",
                "2.1"
              ]
            }
          },
          "required": [
            "date",
            "schema_version"
          ]
        },
        "last_modified": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "date": {
              "type": "string",
              "format": "date"
            },
            "schema_version": {
              "type": "string",
              "enum": [
                "1.0",
                "2.0",
                "2.1"
              ]
            }
          },
          "required": [
            "date",
            "schema_version"
          ]
        }
      },
      "required": [
        "created",
        "last_modified"
      ]
    },
    "domains": {
      "type": "array",
      "uniqueItems": true,
      "default": [],
      "items": {
        "type": "string",
        "pattern": "^((?=[a-z0-9-]{1,63}\\.)[a-z0-9]+(-[a-z0-9]+)*\\.)+[a-z]{2,63}$"
      }
    },
    "established": {
      "type": [
        "null",
        "number"
      ],
      "default": null
    },
    "external_ids": {
      "type": "array",
      "uniqueItems": true,
      "default": [],
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "all": {
            "type": "array",
            "uniqueItems": true,
            "default": [],
            "items": {
              "$ref": "#/$defs/non-empty-string"
            }
          },
          "type": {
            "type": "string",
            "enum": [
              "fundref",
              "grid",
              "isni",
              "wikidata"
            ]
          },
          "preferred": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "all",
          "type"
        ]
      }
    },
    "id": {
      "type": "string",
      "default": "https://ror.org/012xzy7a9",
      "pattern": "^https://ror.org/0[a-z|0-9]{8}$",
      "readOnly": true
    },
    "links": {
      "type": "array",
      "uniqueItems": true,
      "default": [],
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "value": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "website",
              "wikipedia"
            ]
          }
        },
        "required": [
          "type",
          "value"
        ]
      }
    },
    "locations": {
      "type": "array",
      "uniqueItems": true,
      "default": [],
      "minItems": 1,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "geonames_id",
          "geonames_details"
        ],
        "properties": {
          "geonames_id": {
            "type": "integer"
          },
          "geonames_details": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "name"
            ],
            "properties": {
              "name": {
                "$ref": "#/$defs/non-empty-string"
              },
              "lat": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "lng": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "continent_code": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "AF",
                  "AN",
                  "AS",
                  "EU",
                  "NA",
                  "OC",
                  "SA",
                  null
                ]
              },
              "continent_name": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "Africa",
                  "Antarctica",
                  "Asia",
                  "Europe",
                  "Oceania",
                  "South America",
                  "North America",
                  null
                ]
              },
              "country_code": {
                "type": [
                  "string",
                  "null"
                ],
                "pattern": "^[A-Z]{2}$",
                "minLength": 2,
                "maxLength": 2
              },
              "country_name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "country_subdivision_code": {
                "type": [
                  "string",
                  "null"
                ],
                "pattern": "^[A-Z0-9]{1,3}$",
                "minLength": 1,
                "maxLength": 3
              },
              "country_subdivision_name": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          }
        }
      }
    },
    "names": {
      "type": "array",
      "uniqueItems": true,
      "default": [],
      "minItems": 1,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "value": {
            "$ref": "#/$defs/non-empty-string"
          },
          "types": {
            "type": "array",
            "uniqueItems": true,
            "default": [],
            "minItems": 1,
            "items": {
              "type": "string",
              "enum": [
                "acronym",
                "alias",
                "label",
                "ror_display"
              ]
            }
          },
          "lang": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[a-z]{2}$",
            "minLength": 2,
            "maxLength": 2
          }
        },
        "required": [
          "types",
          "value"
        ]
      }
    },
    "relationships": {
      "type": "array",
      "uniqueItems": true,
      "default": [],
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "related",
              "parent",
              "child",
              "successor",
              "predecessor"
            ]
          },
          "id": {
            "type": "string",
            "pattern": "^https://ror.org/0[a-z|0-9]{8}$"
          },
          "label": {
            "$ref": "#/$defs/non-empty-string"
          }
        },
        "required": [
          "id",
          "label",
          "type"
        ]
      }
    },
    "status": {
      "type": "string",
      "default": "active",
      "enum": [
        "active",
        "inactive",
        "withdrawn"
      ]
    },
    "types": {
      "type": "array",
      "uniqueItems": true,
      "minItems": 1,
      "default": [],
      "items": {
        "type": "string",
        "enum": [
          "education",
          "funder",
          "healthcare",
          "company",
          "archive",
          "nonprofit",
          "government",
          "facility",
          "other"
        ]
      }
    }
  },
  "$defs": {
    "non-empty-string": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "admin",
    "id",
    "locations",
    "names",
    "status",
    "types"
  ]
}