{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://degreesofsatoshi.com/encyclopedia/schemas/article-v1.json",
  "title": "Degrees of Satoshi encyclopedia article v1",
  "type": "object",
  "required": [
    "schemaVersion",
    "id",
    "canonical",
    "collection",
    "title",
    "dates",
    "authorship",
    "quickAnswer",
    "keyFacts",
    "sections",
    "claims",
    "sources",
    "revisionHistory"
  ],
  "properties": {
    "schemaVersion": {
      "const": "1.0.0"
    },
    "id": {
      "type": "string"
    },
    "canonical": {
      "type": "string",
      "format": "uri"
    },
    "collection": {
      "enum": [
        "bitcoin",
        "ethereum",
        "stablecoins",
        "defi"
      ]
    },
    "title": {
      "type": "string"
    },
    "dates": {
      "type": "object",
      "required": [
        "published",
        "modified",
        "verified",
        "dataAsOf"
      ],
      "properties": {
        "published": {
          "type": "string"
        },
        "modified": {
          "type": "string"
        },
        "verified": {
          "type": [
            "string",
            "null"
          ]
        },
        "dataAsOf": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "additionalProperties": true
    },
    "authorship": {
      "type": "object"
    },
    "quickAnswer": {
      "type": "object",
      "required": [
        "text",
        "claimId",
        "sourceIds"
      ],
      "properties": {
        "text": {
          "type": "string"
        },
        "claimId": {
          "type": "string"
        },
        "sourceIds": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": true
    },
    "keyFacts": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "label",
          "value",
          "claimId",
          "sourceIds"
        ],
        "properties": {
          "label": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "claimId": {
            "type": "string"
          },
          "sourceIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "additionalProperties": true
      }
    },
    "sections": {
      "type": "array"
    },
    "claims": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "articleSlug",
          "statement",
          "sourceIds",
          "sourceLocators",
          "scope",
          "qualification",
          "evidenceStatus",
          "verification"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "articleSlug": {
            "type": "string"
          },
          "statement": {
            "type": "string"
          },
          "sourceIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sourceLocators": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "sourceId",
                "locator"
              ],
              "properties": {
                "sourceId": {
                  "type": "string"
                },
                "locator": {
                  "type": "string"
                }
              },
              "additionalProperties": true
            }
          },
          "scope": {
            "type": "object"
          },
          "qualification": {
            "type": "string"
          },
          "evidenceStatus": {
            "type": "string"
          },
          "verification": {
            "type": "object",
            "required": [
              "status",
              "checkedAt"
            ],
            "properties": {
              "status": {
                "enum": [
                  "verified",
                  "pending",
                  "stale",
                  "needs-review"
                ]
              },
              "checkedAt": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "additionalProperties": true
          }
        },
        "additionalProperties": true
      }
    },
    "sources": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "recordId",
          "url",
          "publisher",
          "locator",
          "checkedAt",
          "version"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "recordId": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "publisher": {
            "type": "string"
          },
          "locator": {
            "type": "string"
          },
          "checkedAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "version": {
            "type": [
              "string",
              "null"
            ]
          },
          "contentSha256": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": true
      }
    },
    "revisionHistory": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "date",
          "kind",
          "summary"
        ],
        "properties": {
          "date": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          }
        },
        "additionalProperties": true
      }
    }
  },
  "additionalProperties": true
}
