{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/passtru/json-schema/passtru-credential-reveal-response-schema.json",
  "title": "CredentialRevealResponse",
  "x-generated": "2026-12-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/passtru-openapi.yml#/components/schemas/CredentialRevealResponse",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "app_id",
    "client_id",
    "state",
    "revealed_once"
  ],
  "properties": {
    "app_id": {
      "type": "string"
    },
    "client_id": {
      "type": "string"
    },
    "client_secret": {
      "type": [
        "string",
        "null"
      ]
    },
    "state": {
      "$ref": "#/$defs/PublicCredentialState"
    },
    "revealed_once": {
      "type": "boolean"
    },
    "expires_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "problem": {
      "anyOf": [
        {
          "$ref": "#/$defs/ProblemDetails"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "$defs": {
    "ProblemDetails": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "title",
        "status",
        "detail",
        "code",
        "retryable",
        "docs_url",
        "errors"
      ],
      "properties": {
        "type": {
          "type": "string",
          "default": "https://docs.passtru.io/errors/problem"
        },
        "title": {
          "type": "string"
        },
        "status": {
          "type": "integer",
          "minimum": 400,
          "maximum": 599
        },
        "detail": {
          "type": "string"
        },
        "code": {
          "type": "string"
        },
        "retryable": {
          "type": "boolean"
        },
        "instance": {
          "type": [
            "string",
            "null"
          ]
        },
        "request_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "docs_url": {
          "type": "string",
          "format": "uri"
        },
        "errors": {
          "type": "array",
          "items": {
            "type": "object"
          }
        }
      }
    },
    "PublicCredentialState": {
      "enum": [
        "not_created",
        "ready",
        "revealed",
        "rotated",
        "expired",
        "locked"
      ]
    }
  }
}