{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dregs-com/json-schema/dregs-com-v1-identity-review-schema.json",
  "title": "V1IdentityReview",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dregs-com-identities-api-openapi.yml#/components/schemas/V1IdentityReview",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "format": "int64"
    },
    "identityId": {
      "type": "string"
    },
    "userFeedback": {
      "type": "string"
    },
    "status": {
      "type": "string"
    },
    "summary": {
      "type": "string"
    },
    "proposedAnalyzers": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/V1ProposedAnalyzer"
      }
    },
    "proposedRevisions": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/V1ProposedRevision"
      }
    },
    "configSuggestions": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/V1ConfigSuggestion"
      }
    },
    "model": {
      "type": "string"
    },
    "errorMessage": {
      "type": "string"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "completedAt": {
      "type": "string",
      "format": "date-time"
    }
  },
  "$defs": {
    "V1AnalyzerComparison": {
      "type": "object",
      "properties": {
        "baselineAnalyzerName": {
          "type": "string"
        },
        "changedCount": {
          "type": "integer",
          "format": "int32"
        },
        "rows": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/V1AnalyzerComparisonRow"
          }
        }
      }
    },
    "V1AnalyzerComparisonRow": {
      "type": "object",
      "properties": {
        "identityId": {
          "type": "string"
        },
        "underReview": {
          "type": "boolean"
        },
        "beforeValue": {
          "type": "number",
          "format": "double"
        },
        "afterValue": {
          "type": "number",
          "format": "double"
        },
        "beforeExplanation": {
          "type": "string"
        },
        "afterExplanation": {
          "type": "string"
        },
        "observationCount": {
          "type": "integer",
          "format": "int32"
        },
        "changed": {
          "type": "boolean"
        },
        "error": {
          "type": "string"
        }
      }
    },
    "V1ConfigSuggestion": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string"
        },
        "value": {
          "type": "string"
        },
        "rationale": {
          "type": "string"
        }
      }
    },
    "V1ProposedAnalyzer": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "category": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "rationale": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "comparison": {
          "$ref": "#/$defs/V1AnalyzerComparison"
        }
      }
    },
    "V1ProposedRevision": {
      "type": "object",
      "properties": {
        "analyzerName": {
          "type": "string"
        },
        "category": {
          "type": "string"
        },
        "rationale": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "comparison": {
          "$ref": "#/$defs/V1AnalyzerComparison"
        }
      }
    }
  }
}