{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://migancore.com/data/temuan.schema.json",
  "title": "MiganCore Finding record",
  "type": "object",
  "required": [
    "id",
    "date",
    "topic",
    "url",
    "title",
    "claim",
    "method",
    "numbers",
    "limits",
    "verification",
    "sources",
    "tags"
  ],
  "additionalProperties": false,
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^TMN-\\d{3}$"
    },
    "date": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "topic": {
      "type": "string"
    },
    "url": {
      "type": "object",
      "required": [
        "id",
        "en"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "en": {
          "type": "string"
        }
      }
    },
    "title": {
      "type": "object",
      "required": [
        "id",
        "en"
      ],
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string",
          "minLength": 10
        },
        "en": {
          "type": "string",
          "minLength": 10
        }
      }
    },
    "claim": {
      "type": "object",
      "required": [
        "id",
        "en"
      ],
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string",
          "minLength": 10
        },
        "en": {
          "type": "string",
          "minLength": 10
        }
      }
    },
    "method": {
      "type": "object",
      "required": [
        "id",
        "en"
      ],
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string",
          "minLength": 10
        },
        "en": {
          "type": "string",
          "minLength": 10
        }
      }
    },
    "numbers": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "required": [
          "label",
          "value"
        ],
        "properties": {
          "label": {
            "type": "object",
            "required": [
              "id",
              "en"
            ],
            "additionalProperties": false,
            "properties": {
              "id": {
                "type": "string",
                "minLength": 10
              },
              "en": {
                "type": "string",
                "minLength": 10
              }
            }
          },
          "value": {
            "type": "object",
            "required": [
              "id",
              "en"
            ],
            "additionalProperties": false,
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1
              },
              "en": {
                "type": "string",
                "minLength": 1
              }
            }
          }
        }
      }
    },
    "data": {
      "type": "object"
    },
    "limits": {
      "type": "object",
      "required": [
        "id",
        "en"
      ],
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "string"
          }
        },
        "en": {
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "string"
          }
        }
      }
    },
    "verification": {
      "type": "object",
      "required": [
        "level",
        "note"
      ],
      "properties": {
        "level": {
          "enum": [
            "dihitung-ulang",
            "sebagian-dihitung-ulang",
            "dikutip-dari-sumber-publik",
            "dikutip-dari-catatan"
          ]
        },
        "note": {
          "type": "object",
          "required": [
            "id",
            "en"
          ],
          "additionalProperties": false,
          "properties": {
            "id": {
              "type": "string",
              "minLength": 10
            },
            "en": {
              "type": "string",
              "minLength": 10
            }
          }
        }
      }
    },
    "sources": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "required": [
          "type",
          "label",
          "date",
          "url"
        ],
        "properties": {
          "type": {
            "enum": [
              "public",
              "internal"
            ]
          },
          "label": {
            "type": "object",
            "required": [
              "id",
              "en"
            ],
            "additionalProperties": false,
            "properties": {
              "id": {
                "type": "string",
                "minLength": 10
              },
              "en": {
                "type": "string",
                "minLength": 10
              }
            }
          },
          "date": {
            "type": "string"
          },
          "url": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      }
    },
    "tags": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "string"
      }
    }
  }
}
