{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/myleadtech-app/json-schema/myleadtech-app-fault-code-out-schema.json",
  "title": "FaultCodeOut",
  "description": "Verbatim publié seulement : aucune génération.",
  "x-generated": "2026-11-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/myleadtech-app-openapi.json#/components/schemas/FaultCodeOut",
  "properties": {
    "request_id": {
      "type": "string",
      "title": "Request Id"
    },
    "contract_version": {
      "type": "string",
      "title": "Contract Version",
      "default": "ar-00/1"
    },
    "service_revision": {
      "type": "string",
      "title": "Service Revision"
    },
    "publication": {
      "$ref": "#/$defs/Publication"
    },
    "status": {
      "type": "string",
      "title": "Status"
    },
    "partial": {
      "type": "boolean",
      "title": "Partial",
      "default": false
    },
    "missing": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Missing"
    },
    "degraded": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Degraded"
    },
    "usage": {
      "$ref": "#/$defs/CatalogUsage"
    },
    "notice": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Notice"
    },
    "code": {
      "type": "string",
      "title": "Code"
    },
    "verbatim": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Verbatim"
    },
    "value": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Value"
    },
    "unit": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Unit"
    },
    "applies_to": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Applies To"
    },
    "source_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Source Id"
    },
    "document_version_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Document Version Id"
    },
    "page_number": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Page Number"
    },
    "citations": {
      "items": {
        "$ref": "#/$defs/Citation"
      },
      "type": "array",
      "title": "Citations"
    },
    "clarification": {
      "anyOf": [
        {
          "$ref": "#/$defs/Clarification"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "type": "object",
  "required": [
    "request_id",
    "service_revision",
    "publication",
    "status",
    "usage",
    "code"
  ],
  "$defs": {
    "Boite": {
      "properties": {
        "x0": {
          "type": "number",
          "title": "X0"
        },
        "y0": {
          "type": "number",
          "title": "Y0"
        },
        "x1": {
          "type": "number",
          "title": "X1"
        },
        "y1": {
          "type": "number",
          "title": "Y1"
        }
      },
      "type": "object",
      "required": [
        "x0",
        "y0",
        "x1",
        "y1"
      ],
      "title": "Boite"
    },
    "CatalogUsage": {
      "properties": {
        "operation": {
          "type": "string",
          "title": "Operation"
        },
        "debited": {
          "type": "boolean",
          "title": "Debited"
        },
        "units": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Units"
        },
        "remaining": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Remaining"
        },
        "window_end": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Window End"
        }
      },
      "type": "object",
      "required": [
        "operation",
        "debited"
      ],
      "title": "CatalogUsage"
    },
    "Citation": {
      "properties": {
        "citation_window_id": {
          "type": "string",
          "title": "Citation Window Id"
        },
        "page_number": {
          "type": "integer",
          "title": "Page Number"
        },
        "box": {
          "anyOf": [
            {
              "$ref": "#/$defs/Boite"
            },
            {
              "type": "null"
            }
          ]
        },
        "page_actions": {
          "$ref": "#/$defs/PageActions"
        }
      },
      "type": "object",
      "required": [
        "citation_window_id",
        "page_number",
        "page_actions"
      ],
      "title": "Citation"
    },
    "Clarification": {
      "properties": {
        "question": {
          "type": "string",
          "title": "Question"
        },
        "options": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Options"
        },
        "field": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Field"
        },
        "reason_code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Reason Code"
        },
        "choices": {
          "anyOf": [
            {
              "items": {
                "$ref": "#/$defs/ClarificationChoice"
              },
              "type": "array",
              "maxItems": 5
            },
            {
              "type": "null"
            }
          ],
          "title": "Choices"
        }
      },
      "type": "object",
      "required": [
        "question"
      ],
      "title": "Clarification"
    },
    "ClarificationChoice": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id"
        },
        "label": {
          "type": "string",
          "title": "Label"
        }
      },
      "type": "object",
      "required": [
        "id",
        "label"
      ],
      "title": "ClarificationChoice"
    },
    "PageActions": {
      "properties": {
        "rest_path": {
          "type": "string",
          "title": "Rest Path"
        },
        "default_format": {
          "type": "string",
          "title": "Default Format",
          "default": "png"
        }
      },
      "type": "object",
      "required": [
        "rest_path"
      ],
      "title": "PageActions"
    },
    "Publication": {
      "properties": {
        "branch": {
          "type": "string",
          "title": "Branch"
        },
        "snapshot_ref": {
          "type": "string",
          "title": "Snapshot Ref"
        }
      },
      "type": "object",
      "required": [
        "branch",
        "snapshot_ref"
      ],
      "title": "Publication"
    }
  }
}