{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://veri.how/patents.schema.json",
  "title": "veri.how patents",
  "description": "Veritaseum’s patent family: register facts, abstract and claims of each document.",
  "type": "object",
  "required": [
    "description",
    "license",
    "title",
    "inventors",
    "assignee",
    "documents"
  ],
  "additionalProperties": false,
  "properties": {
    "$schema": {
      "type": "string",
      "format": "uri"
    },
    "description": {
      "type": "string"
    },
    "license": {
      "type": "string"
    },
    "title": {
      "type": "string",
      "description": "The title shared by every document in the family."
    },
    "inventors": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "assignee": {
      "type": "string"
    },
    "documents": {
      "description": "Documents by slug: the Google Patents id in lowercase.",
      "type": "object",
      "additionalProperties": {
        "type": "object",
        "required": [
          "number",
          "office",
          "status",
          "application",
          "filed",
          "language",
          "url",
          "google",
          "source",
          "abstract",
          "claims"
        ],
        "additionalProperties": false,
        "properties": {
          "number": {
            "type": "string",
            "description": "The publication number as the office prints it."
          },
          "office": {
            "type": "string"
          },
          "status": {
            "enum": [
              "Granted",
              "Published application"
            ]
          },
          "application": {
            "type": "string",
            "description": "The application number."
          },
          "filed": {
            "type": "string",
            "format": "date"
          },
          "granted": {
            "type": "string",
            "format": "date",
            "description": "The grant date of a granted patent."
          },
          "published": {
            "type": "string",
            "format": "date",
            "description": "The publication date of a pending application."
          },
          "basedOn": {
            "type": "string",
            "description": "Slug of the parent this continuation or divisional derives from."
          },
          "validations": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "name",
                "value",
                "google",
                "language",
                "url"
              ],
              "additionalProperties": false,
              "properties": {
                "name": {
                  "type": "string"
                },
                "value": {
                  "type": "string"
                },
                "google": {
                  "type": "string",
                  "description": "The Google Patents id of the validation."
                },
                "language": {
                  "type": "string",
                  "description": "The language of its text, BCP 47."
                },
                "url": {
                  "type": "string",
                  "format": "uri"
                }
              }
            }
          },
          "language": {
            "enum": [
              "en",
              "ja",
              "zh"
            ],
            "description": "BCP 47 language of the text."
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "The document’s page on veri.how."
          },
          "google": {
            "type": "string",
            "format": "uri",
            "description": "The document on Google Patents."
          },
          "source": {
            "type": "object",
            "required": [
              "url",
              "fetched"
            ],
            "additionalProperties": false,
            "properties": {
              "url": {
                "type": "string",
                "format": "uri",
                "description": "The page the text was copied from."
              },
              "fetched": {
                "type": "string",
                "format": "date",
                "description": "When it was copied."
              }
            }
          },
          "abstract": {
            "type": [
              "string",
              "null"
            ],
            "description": "Null when the office published none."
          },
          "claims": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "num",
                "url",
                "independent",
                "dependsOn",
                "text"
              ],
              "additionalProperties": false,
              "properties": {
                "num": {
                  "type": "integer",
                  "minimum": 1
                },
                "url": {
                  "type": "string",
                  "format": "uri",
                  "description": "The anchor to cite this claim by."
                },
                "independent": {
                  "type": "boolean"
                },
                "dependsOn": {
                  "type": "array",
                  "items": {
                    "type": "integer",
                    "minimum": 1
                  }
                },
                "canceled": {
                  "const": true
                },
                "text": {
                  "type": "string",
                  "description": "The claim as the office prints it."
                },
                "reading": {
                  "type": "string",
                  "description": "A plain reading of an independent English claim: what the text says, never what it covers. CC BY 4.0."
                }
              }
            }
          }
        }
      }
    }
  }
}
