{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/feedback1-ai/json-schema/feedback1-ai-api-key-list-schema.json",
  "title": "ApiKeyList",
  "description": "List of API keys",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/feedback1-ai-api-keys-api-openapi.yml#/components/schemas/ApiKeyList",
  "properties": {
    "items": {
      "items": {
        "$ref": "#/$defs/ApiKeyResponse"
      },
      "type": "array",
      "title": "Items"
    },
    "total": {
      "type": "integer",
      "title": "Total"
    }
  },
  "type": "object",
  "required": [
    "items",
    "total"
  ],
  "$defs": {
    "ApiKeyResponse": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id"
        },
        "name": {
          "type": "string",
          "title": "Name"
        },
        "product_id": {
          "type": "string",
          "title": "Product Id"
        },
        "product_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Product Name",
          "description": "Product name for display"
        },
        "product_pub_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Product Pub Id",
          "description": "Product public ID"
        },
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Description"
        },
        "key_prefix": {
          "type": "string",
          "title": "Key Prefix",
          "description": "Key prefix (e.g., 'apikey_xxxxx')"
        },
        "last_used_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Last Used At"
        },
        "request_count": {
          "type": "integer",
          "title": "Request Count"
        },
        "is_active": {
          "type": "boolean",
          "title": "Is Active"
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "title": "Created At"
        },
        "expires_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Expires At"
        }
      },
      "type": "object",
      "required": [
        "id",
        "name",
        "product_id",
        "description",
        "key_prefix",
        "last_used_at",
        "request_count",
        "is_active",
        "created_at",
        "expires_at"
      ],
      "title": "ApiKeyResponse",
      "description": "API key details (without the actual key)"
    }
  }
}