{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/codecov/main/json-schema/codecov-coverage-report-schema.json",
  "title": "CoverageReport",
  "x-generated": "2026-10-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/codecov-coverage-api-openapi.yml#/components/schemas/CoverageReport",
  "type": "object",
  "properties": {
    "totals": {
      "allOf": [
        {
          "$ref": "#/$defs/ReportTotals"
        }
      ],
      "title": "coverage totals"
    },
    "files": {
      "allOf": [
        {
          "$ref": "#/$defs/ReportFile"
        }
      ],
      "readOnly": true,
      "title": "file specific coverage totals"
    },
    "commit_file_url": {
      "type": "string",
      "title": "Codecov url to see file coverage on commit. Can be unreliable with partial path names."
    }
  },
  "required": [
    "commit_file_url",
    "files",
    "totals"
  ],
  "$defs": {
    "ReportFile": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "title": "file path"
        },
        "totals": {
          "allOf": [
            {
              "$ref": "#/$defs/ReportTotals"
            }
          ],
          "title": "coverage totals"
        },
        "line_coverage": {
          "type": "array",
          "items": {},
          "readOnly": true,
          "title": "line-by-line coverage values"
        }
      },
      "required": [
        "line_coverage",
        "name",
        "totals"
      ]
    },
    "ReportTotals": {
      "type": "object",
      "properties": {
        "files": {
          "type": "integer"
        },
        "lines": {
          "type": "integer"
        },
        "hits": {
          "type": "integer"
        },
        "misses": {
          "type": "integer"
        },
        "partials": {
          "type": "integer"
        },
        "coverage": {
          "type": "number",
          "format": "double",
          "readOnly": true
        },
        "branches": {
          "type": "integer"
        },
        "methods": {
          "type": "integer"
        },
        "messages": {
          "type": "integer"
        },
        "sessions": {
          "type": "integer"
        },
        "complexity": {
          "type": "number",
          "format": "double"
        },
        "complexity_total": {
          "type": "number",
          "format": "double"
        },
        "complexity_ratio": {
          "type": "number",
          "format": "double",
          "readOnly": true
        },
        "diff": {}
      },
      "required": [
        "branches",
        "complexity",
        "complexity_ratio",
        "complexity_total",
        "coverage",
        "diff",
        "files",
        "hits",
        "lines",
        "messages",
        "methods",
        "misses",
        "partials",
        "sessions"
      ]
    }
  }
}