{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/softsync-ai/json-schema/softsync-ai-table-compile-result-schema.json",
  "title": "TableCompileResult",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/softsync-ai-objects-api-openapi.yml#/components/schemas/TableCompileResult",
  "type": "object",
  "properties": {
    "valid": {
      "type": "boolean"
    },
    "diagnostics": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/TableCompileDiagnostic"
      }
    },
    "errors": {
      "type": "number"
    },
    "warnings": {
      "type": "number"
    },
    "infos": {
      "type": "number"
    }
  },
  "required": [
    "valid",
    "diagnostics",
    "errors",
    "warnings",
    "infos"
  ],
  "$defs": {
    "TableCompileDiagnostic": {
      "type": "object",
      "properties": {
        "severity": {
          "allOf": [
            {
              "$ref": "#/$defs/TableDiagnosticSeverity"
            }
          ]
        },
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "tableApiName": {
          "type": "string"
        },
        "tableId": {
          "type": "string"
        },
        "fieldApiName": {
          "type": "string"
        },
        "fieldId": {
          "type": "string"
        },
        "suggestion": {
          "type": "string"
        },
        "range": {
          "description": "Characters of the formula the problem is about",
          "allOf": [
            {
              "$ref": "#/$defs/TextRange"
            }
          ]
        },
        "params": {
          "type": "object",
          "additionalProperties": true,
          "description": "Values for the translated message, e.g. the field name"
        }
      },
      "required": [
        "severity",
        "code",
        "message"
      ]
    },
    "TableDiagnosticSeverity": {
      "type": "string",
      "enum": [
        "error",
        "warning",
        "info"
      ]
    },
    "TextRange": {
      "type": "object",
      "properties": {
        "from": {
          "type": "number"
        },
        "to": {
          "type": "number"
        }
      },
      "required": [
        "from",
        "to"
      ]
    }
  }
}