{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/costrinity-xyz/json-schema/costrinity-xyz-consent-check-result-schema.json",
  "title": "ConsentCheckResult",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/costrinity-xyz-openapi.yml#/components/schemas/ConsentCheckResult",
  "type": "object",
  "required": [
    "allowed",
    "reason",
    "matching_consent_id",
    "principal_id"
  ],
  "properties": {
    "allowed": {
      "type": "boolean"
    },
    "reason": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        null,
        "no_principal",
        "no_active_consent",
        "purpose_mismatch",
        "category_overflow"
      ]
    },
    "matching_consent_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "principal_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    }
  }
}