{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/klanexai-com/json-schema/klanexai-com-connection-schema.json",
  "title": "Connection",
  "description": "Secret-free view of a vault connection.",
  "x-generated": "2026-11-13",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/klanexai-com-openapi.yml#/components/schemas/Connection",
  "type": "object",
  "properties": {
    "connection_id": {
      "type": "string"
    },
    "provider": {
      "type": "string"
    },
    "grant_type": {
      "type": "string",
      "enum": [
        "static_bearer",
        "oauth2_client_credentials",
        "oauth2_authorization_code"
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "pending",
        "connected",
        "error"
      ]
    },
    "inject_header": {
      "type": "string"
    },
    "scopes": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "expires_at": {
      "type": "string",
      "format": "date-time"
    },
    "authorize_url": {
      "type": "string",
      "description": "Present on create for authorization-code connections."
    },
    "last_error": {
      "type": "string"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}