{
  "id": "https://standard.open-contracting.org/infrastructure/schema/0__9__5/project-package-schema.json",
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Schema for an OC4IDS project package",
  "description": "A package of OC4IDS projects. Note that all projects within a package must have a unique project identifier.",
  "type": "object",
  "required": [
    "uri",
    "publisher",
    "publishedDate",
    "projects",
    "version"
  ],
  "properties": {
    "uri": {
      "title": "Package identifier",
      "description": "The URI of this package that identifies it uniquely in the world. Recommended practice is to use a dereferenceable URI, where a persistent copy of this package is available.",
      "type": "string",
      "format": "uri"
    },
    "publishedDate": {
      "title": "Published date",
      "description": "The date that this package was published. If this package is generated 'on demand', this date should reflect the date of the last change to the underlying contents of the package.",
      "type": "string",
      "format": "date-time"
    },
    "version": {
      "title": "OC4IDS schema version",
      "description": "The version of the OC4IDS schema used in this package, expressed as major.minor. For example: 0.9",
      "type": "string",
      "pattern": "^(\\d+\\.)(\\d+)$"
    },
    "projects": {
      "title": "Projects",
      "description": "A list of projects included in this package, in OC4IDS format.",
      "type": "array",
      "minItems": 1,
      "items": {
        "$ref": "https://standard.open-contracting.org/infrastructure/schema/0__9__5/project-schema.json"
      },
      "uniqueItems": true
    },
    "publisher": {
      "title": "Publisher",
      "description": "Information to uniquely identify the publisher of this package.",
      "type": "object",
      "properties": {
        "name": {
          "title": "Name",
          "description": "The name of the organization or department responsible for publishing this data.",
          "type": "string",
          "minLength": 1
        },
        "scheme": {
          "title": "Scheme",
          "description": "The scheme that holds the unique identifiers used to identify the item being identified.",
          "type": [
            "string",
            "null"
          ]
        },
        "uid": {
          "title": "uid",
          "description": "The unique ID for this entity under the given ID scheme.",
          "type": [
            "string",
            "null"
          ]
        },
        "uri": {
          "title": "URI",
          "description": "A URI to identify the publisher.",
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        }
      },
      "required": [
        "name"
      ],
      "minProperties": 1
    },
    "license": {
      "title": "License",
      "description": "A link to the license that applies to the data in this package. A Public Domain Dedication or [Open Definition Conformant](https://opendefinition.org/licenses/) license is strongly recommended. The canonical URI of the license should be used. Documents linked from this file may be under other license conditions.",
      "type": [
        "string",
        "null"
      ],
      "format": "uri"
    },
    "publicationPolicy": {
      "title": "Publication policy",
      "description": "A link to a document describing the publisher's [data user guide](https://standard.open-contracting.org/infrastructure/0.9/en/guidance/data_user_guide/).",
      "type": [
        "string",
        "null"
      ],
      "format": "uri"
    }
  }
}