{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/algo-pw/json-schema/algo-pw-reputation-projection-schema.json",
  "title": "ReputationProjection",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/algo-pw-openapi.json#/components/schemas/ReputationProjection",
  "required": [
    "algorithmVersion",
    "asOf",
    "score",
    "status",
    "eligible",
    "excluded",
    "authors",
    "groups",
    "sponsored",
    "disputed",
    "independenceUnknown",
    "exclusions"
  ],
  "type": "object",
  "properties": {
    "algorithmVersion": {
      "type": "string"
    },
    "asOf": {
      "format": "date-time"
    },
    "score": {
      "pattern": "^-?(?:0|[1-9]\\d*)$",
      "type": [
        "null",
        "integer",
        "string"
      ],
      "format": "int32"
    },
    "status": {
      "type": "string"
    },
    "eligible": {
      "pattern": "^-?(?:0|[1-9]\\d*)$",
      "type": [
        "integer",
        "string"
      ],
      "format": "int32"
    },
    "excluded": {
      "pattern": "^-?(?:0|[1-9]\\d*)$",
      "type": [
        "integer",
        "string"
      ],
      "format": "int32"
    },
    "authors": {
      "pattern": "^-?(?:0|[1-9]\\d*)$",
      "type": [
        "integer",
        "string"
      ],
      "format": "int32"
    },
    "groups": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ReputationGroup"
      }
    },
    "sponsored": {
      "$ref": "#/$defs/VerdictDistribution"
    },
    "disputed": {
      "$ref": "#/$defs/VerdictDistribution"
    },
    "independenceUnknown": {
      "$ref": "#/$defs/VerdictDistribution"
    },
    "exclusions": {
      "type": "object",
      "additionalProperties": {
        "pattern": "^-?(?:0|[1-9]\\d*)$",
        "type": [
          "integer",
          "string"
        ],
        "format": "int32"
      }
    },
    "communityFindings": {
      "type": [
        "null",
        "array"
      ],
      "items": {
        "$ref": "#/$defs/CommunityFinding"
      }
    }
  },
  "$defs": {
    "CommunityFinding": {
      "required": [
        "caseId",
        "round",
        "authorId",
        "finding"
      ],
      "type": "object",
      "properties": {
        "caseId": {
          "type": "string",
          "format": "uuid"
        },
        "round": {
          "pattern": "^-?(?:0|[1-9]\\d*)$",
          "type": [
            "integer",
            "string"
          ],
          "format": "int32"
        },
        "authorId": {
          "type": "string",
          "format": "uuid"
        },
        "finding": {
          "type": "string"
        }
      }
    },
    "ReputationGroup": {
      "required": [
        "group",
        "observations",
        "rating",
        "weight"
      ],
      "type": "object",
      "properties": {
        "group": {
          "type": "string"
        },
        "observations": {
          "pattern": "^-?(?:0|[1-9]\\d*)$",
          "type": [
            "integer",
            "string"
          ],
          "format": "int32"
        },
        "rating": {
          "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
          "type": [
            "number",
            "string"
          ],
          "format": "double"
        },
        "weight": {
          "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
          "type": [
            "number",
            "string"
          ],
          "format": "double"
        }
      }
    },
    "VerdictDistribution": {
      "required": [
        "negative",
        "neutral",
        "positive"
      ],
      "type": "object",
      "properties": {
        "negative": {
          "pattern": "^-?(?:0|[1-9]\\d*)$",
          "type": [
            "integer",
            "string"
          ],
          "format": "int32"
        },
        "neutral": {
          "pattern": "^-?(?:0|[1-9]\\d*)$",
          "type": [
            "integer",
            "string"
          ],
          "format": "int32"
        },
        "positive": {
          "pattern": "^-?(?:0|[1-9]\\d*)$",
          "type": [
            "integer",
            "string"
          ],
          "format": "int32"
        }
      }
    }
  }
}