{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://veri.how/timeline.schema.json",
  "title": "veri.how timeline",
  "description": "What Veritaseum shipped and when, beside the industry’s events.",
  "type": "object",
  "required": [
    "description",
    "license",
    "entries"
  ],
  "additionalProperties": false,
  "properties": {
    "$schema": {
      "type": "string",
      "format": "uri"
    },
    "description": {
      "type": "string"
    },
    "license": {
      "const": "MIT"
    },
    "entries": {
      "description": "Entries sorted by date; eras by their start.",
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "date",
          "precision",
          "title",
          "description",
          "lane",
          "kind",
          "tier",
          "sources"
        ],
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string"
          },
          "date": {
            "type": "string",
            "pattern": "^(\\d{4})(?:-(\\d{2})(?:-(\\d{2}))?)?$",
            "description": "YYYY, YYYY-MM or YYYY-MM-DD, at the source’s precision."
          },
          "end": {
            "type": "string",
            "pattern": "^(\\d{4})(?:-(\\d{2})(?:-(\\d{2}))?)?$",
            "description": "An era’s end, at the same precision as date."
          },
          "precision": {
            "enum": [
              "year",
              "month",
              "day"
            ]
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "lane": {
            "enum": [
              "veritaseum",
              "industry"
            ]
          },
          "kind": {
            "enum": [
              "software",
              "patent",
              "industry"
            ]
          },
          "tier": {
            "enum": [
              "on-chain",
              "register",
              "git",
              "archive",
              "publication",
              "testimony"
            ]
          },
          "sources": {
            "type": "array",
            "minItems": 1,
            "items": {
              "oneOf": [
                {
                  "description": "A document a reader can open.",
                  "type": "object",
                  "required": [
                    "title",
                    "url"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string",
                      "format": "uri"
                    }
                  }
                },
                {
                  "description": "Commit history of a private repository, and the date it was read.",
                  "type": "object",
                  "required": [
                    "repository",
                    "read"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "repository": {
                      "type": "string"
                    },
                    "read": {
                      "type": "string",
                      "pattern": "^(\\d{4})(?:-(\\d{2})(?:-(\\d{2}))?)?$",
                      "description": "YYYY, YYYY-MM or YYYY-MM-DD, at the source’s precision."
                    }
                  }
                },
                {
                  "description": "The maintainer’s own word, and the date it was stated.",
                  "type": "object",
                  "required": [
                    "stated"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "stated": {
                      "type": "string",
                      "pattern": "^(\\d{4})(?:-(\\d{2})(?:-(\\d{2}))?)?$",
                      "description": "YYYY, YYYY-MM or YYYY-MM-DD, at the source’s precision."
                    }
                  }
                }
              ]
            }
          }
        }
      }
    }
  }
}
