{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://sake92.github.io/codeps/schemas/findings.schema.json",
  "title": "FindingsSelection",
  "description": "Codeps bounded findings selection v1",
  "type": "object",
  "properties": {
    "schemaVersion": {
      "const": 1
    },
    "project": {
      "type": "string"
    },
    "scope": {
      "enum": [
        "packages",
        "files"
      ]
    },
    "generatedAt": {
      "type": "string",
      "format": "date-time"
    },
    "total": {
      "type": "integer",
      "minimum": 0,
      "description": "Number of cached findings matching the filters, before applying limit.",
      "format": "int32",
      "maximum": 2147483647
    },
    "omitted": {
      "type": "integer",
      "minimum": 0,
      "description": "Cached matches omitted by limit; total equals findings.length plus omitted.",
      "format": "int32",
      "maximum": 2147483647
    },
    "sourceFindingsOmitted": {
      "type": "integer",
      "minimum": 0,
      "description": "Findings omitted when caching the scope report, before these filters. Their kinds/severities are unknown.",
      "format": "int32",
      "maximum": 2147483647
    },
    "findings": {
      "type": "array",
      "items": {
        "$ref": "definitions.schema.json#/$defs/finding"
      },
      "maxItems": 10000
    }
  },
  "required": [
    "schemaVersion",
    "project",
    "scope",
    "generatedAt",
    "total",
    "omitted",
    "sourceFindingsOmitted",
    "findings"
  ]
}
