{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/kaiv-ai/json-schema/kaiv-ai-credential-schema.json",
  "title": "Credential",
  "description": "What Bridge sends to your API or MCP server. Stored encrypted; never shown to an AI client.",
  "x-generated": "2026-10-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/kaiv-ai-openapi.json#/components/schemas/Credential",
  "oneOf": [
    {
      "type": "object",
      "title": "Bearer token",
      "required": [
        "type",
        "token"
      ],
      "properties": {
        "type": {
          "const": "bearer"
        },
        "token": {
          "type": "string"
        }
      }
    },
    {
      "type": "object",
      "title": "Username and password",
      "required": [
        "type",
        "username"
      ],
      "properties": {
        "type": {
          "const": "basic"
        },
        "username": {
          "type": "string"
        },
        "password": {
          "type": "string"
        }
      }
    },
    {
      "type": "object",
      "title": "Header",
      "required": [
        "type",
        "name",
        "value"
      ],
      "properties": {
        "type": {
          "const": "header"
        },
        "name": {
          "type": "string"
        },
        "value": {
          "type": "string"
        }
      }
    },
    {
      "type": "object",
      "title": "Query parameter",
      "required": [
        "type",
        "name",
        "value"
      ],
      "properties": {
        "type": {
          "const": "query"
        },
        "name": {
          "type": "string"
        },
        "value": {
          "type": "string"
        }
      }
    }
  ]
}