{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "operation-run-context.provider-connection-check.schema.json",
  "title": "OperationRun Context — provider.connection.check",
  "type": "object",
  "additionalProperties": true,
  "properties": {
    "provider": { "type": "string", "minLength": 1 },
    "module": { "type": "string", "minLength": 1 },
    "provider_connection_id": { "type": "integer", "minimum": 1 },
    "target_scope": {
      "type": "object",
      "additionalProperties": true,
      "properties": {
        "entra_tenant_id": { "type": "string", "minLength": 1 },
        "entra_tenant_name": { "type": "string", "minLength": 1 }
      },
      "required": ["entra_tenant_id"]
    },
    "reason_code": { "type": "string", "minLength": 1 },
    "next_steps": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": ["label", "url"],
        "properties": {
          "label": { "type": "string", "minLength": 1 },
          "url": { "type": "string", "minLength": 1 }
        }
      }
    },
    "verification_report": {
      "description": "Stored verification report document. For completed blocked runs, this MUST be present and schema-valid per verification-report.v1_5 schema.",
      "type": "object",
      "additionalProperties": true
    }
  },
  "required": ["provider", "module", "target_scope"]
}
