{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/rightis-org/json-schema/rightis-org-persona-policy-schema.json",
  "title": "PersonaPolicy",
  "x-generated": "2026-11-23",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/rightis-org-openapi.json#/components/schemas/PersonaPolicy",
  "type": "object",
  "properties": {
    "policy_schema_version": {
      "type": "integer"
    },
    "service_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "issued_at": {
      "type": "string",
      "format": "date-time"
    },
    "valid_now": {
      "type": "boolean"
    },
    "license": {
      "type": "object",
      "properties": {
        "public_code": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "start_date": {
          "type": "string"
        },
        "end_date": {
          "type": "string"
        },
        "territory": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "persona": {
      "type": "object",
      "properties": {
        "public_code": {
          "type": "string"
        },
        "rights_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "display_name": {
          "type": [
            "string",
            "null"
          ]
        },
        "verification_level": {
          "type": "string"
        },
        "completion_stage": {
          "type": "string"
        }
      }
    },
    "scope": {
      "type": "object",
      "additionalProperties": true
    },
    "rules": {
      "type": [
        "object",
        "null"
      ],
      "description": "null until the rights holder publishes a policy — treat null as \"block everything except approved assets\".",
      "properties": {
        "version": {
          "type": "integer"
        },
        "published_at": {
          "type": "string"
        },
        "address_style": {
          "type": [
            "string",
            "null"
          ]
        },
        "relationship_boundaries": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "knowledge_cutoff": {
          "type": [
            "string",
            "null"
          ]
        },
        "prohibited_topics": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "safe_fallbacks": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "disclaimer_required": {
          "type": "boolean"
        },
        "custom": {
          "type": [
            "object",
            "null"
          ],
          "additionalProperties": true
        }
      }
    }
  }
}