{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "OpenAgentWorks diagnostic",
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "minLength": 1
    },
    "severity": {
      "enum": [
        "error",
        "warning",
        "info"
      ]
    },
    "resource_path": {
      "type": [
        "string",
        "null"
      ]
    },
    "json_pointer": {
      "type": [
        "string",
        "null"
      ]
    },
    "record_ids": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      }
    },
    "message": {
      "type": "string",
      "minLength": 1
    },
    "clause_refs": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      }
    }
  },
  "required": [
    "code",
    "severity",
    "resource_path",
    "json_pointer",
    "record_ids",
    "message",
    "clause_refs"
  ],
  "additionalProperties": false
}
