{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://loi-integrale.placedelinfo.org/data/schema.json",
  "title": "Proposition FLI vs PPL 3106",
  "type": "object",
  "required": [
    "id",
    "title",
    "proposal_text",
    "status",
    "status_label",
    "review_status",
    "source_version",
    "canonical_url",
    "updated_at"
  ],
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^O[0-9]{3}$"
    },
    "title": {
      "type": "string"
    },
    "proposal_text": {
      "type": "string"
    },
    "domain": {
      "type": "string"
    },
    "status": {
      "enum": [
        "reprise",
        "partielle",
        "absente"
      ]
    },
    "status_label": {
      "type": "string"
    },
    "score": {
      "type": [
        "number",
        "null"
      ]
    },
    "matched_articles": {
      "type": "array",
      "items": {
        "type": "integer"
      }
    },
    "candidate_articles": {
      "type": "array",
      "items": {
        "type": "integer"
      }
    },
    "source_version": {
      "type": "string"
    },
    "analysis": {
      "type": [
        "string",
        "null"
      ]
    },
    "justification_auto": {
      "type": [
        "string",
        "null"
      ]
    },
    "review_status": {
      "enum": [
        "relue",
        "en_cours_de_verification"
      ]
    },
    "reviewed_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date"
    },
    "updated_at": {
      "type": "string",
      "format": "date"
    },
    "canonical_url": {
      "type": "string",
      "format": "uri"
    },
    "markdown_url": {
      "type": "string",
      "format": "uri"
    },
    "sources": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "title",
          "url",
          "type"
        ],
        "properties": {
          "title": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "type": {
            "type": "string"
          }
        }
      }
    }
  }
}
