{
  "$defs": {
    "AuditFindingV1": {
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "path": {
          "type": [
            "string",
            "null"
          ]
        },
        "severity": {
          "$ref": "#/$defs/AuditSeverityV1"
        },
        "source_span": {
          "anyOf": [
            {
              "$ref": "#/$defs/SourceSpan"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "severity",
        "code",
        "message"
      ],
      "type": "object"
    },
    "AuditSeverityV1": {
      "enum": [
        "info",
        "warning",
        "error"
      ],
      "type": "string"
    },
    "SourcePosition": {
      "properties": {
        "byte_offset": {
          "description": "Zero-based byte offset in the original source.",
          "format": "uint",
          "minimum": 0,
          "type": "integer"
        },
        "column": {
          "description": "One-based Unicode-byte column number.",
          "format": "uint",
          "minimum": 0,
          "type": "integer"
        },
        "line": {
          "description": "One-based line number.",
          "format": "uint",
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "line",
        "column",
        "byte_offset"
      ],
      "type": "object"
    },
    "SourceSpan": {
      "description": "A half-open source range: `start` is included and `end` is excluded.",
      "properties": {
        "end": {
          "$ref": "#/$defs/SourcePosition"
        },
        "start": {
          "$ref": "#/$defs/SourcePosition"
        }
      },
      "required": [
        "start",
        "end"
      ],
      "type": "object"
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "findings": {
      "items": {
        "$ref": "#/$defs/AuditFindingV1"
      },
      "type": "array"
    },
    "schema_version": {
      "type": "string"
    },
    "subject": {
      "type": "string"
    }
  },
  "required": [
    "schema_version",
    "subject",
    "findings"
  ],
  "title": "AuditReportV1",
  "type": "object"
}
