{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/clusterhack-dev/json-schema/clusterhack-dev-paginated-plan-list-schema.json",
  "title": "PaginatedPlanList",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/clusterhack-dev-billing-api-openapi.yml#/components/schemas/PaginatedPlanList",
  "type": "object",
  "required": [
    "count",
    "results"
  ],
  "properties": {
    "count": {
      "type": "integer"
    },
    "next": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri"
    },
    "previous": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri"
    },
    "results": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Plan"
      }
    }
  },
  "$defs": {
    "Plan": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "readOnly": true
        },
        "code": {
          "type": "string",
          "title": "Plan code",
          "description": "Stable machine identifier, e.g. 'free', 'pro', 'corp'.",
          "maxLength": 32,
          "pattern": "^[-a-zA-Z0-9_]+$"
        },
        "name": {
          "type": "string",
          "title": "Display name",
          "maxLength": 120
        },
        "price_cents": {
          "type": "integer",
          "maximum": 2147483647,
          "minimum": 0,
          "title": "Monthly price, cents",
          "description": "0 = free tier."
        },
        "currency": {
          "type": "string",
          "maxLength": 3
        },
        "allow_branding": {
          "type": "boolean",
          "title": "White-label branding"
        },
        "allow_private_events": {
          "type": "boolean",
          "title": "Private events"
        },
        "allow_analytics": {
          "type": "boolean",
          "title": "Analytics dashboard"
        },
        "max_events": {
          "type": [
            "integer",
            "null"
          ],
          "maximum": 2147483647,
          "minimum": 0,
          "description": "Maximum number of events the organizer may own. NULL = unlimited."
        },
        "max_participants_per_event": {
          "type": [
            "integer",
            "null"
          ],
          "maximum": 2147483647,
          "minimum": 0,
          "description": "Maximum participants per event. NULL = unlimited."
        },
        "is_default": {
          "type": "boolean",
          "title": "Default plan",
          "description": "Assigned to new organizers automatically."
        },
        "sort_order": {
          "type": "integer",
          "maximum": 32767,
          "minimum": 0
        }
      },
      "required": [
        "code",
        "id",
        "name"
      ]
    }
  }
}