{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pepbank-io/json-schema/pepbank-io-plan-list-schema.json",
  "title": "PlanList",
  "description": "Plans, grants and quotas. Draft plans show available: false.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pepbank-io-account-api-openapi.yml#/components/schemas/PlanList",
  "type": "object",
  "properties": {
    "credit": {
      "type": "object",
      "properties": {
        "text": {
          "type": "string",
          "enum": [
            "Data from PepBank"
          ]
        },
        "line": {
          "type": "string",
          "description": "Credit sentence. Copy it as written."
        },
        "url": {
          "type": "string",
          "format": "uri",
          "description": "PepBank page for this result. The home page applies when no single page fits."
        },
        "license_url": {
          "type": "string",
          "enum": [
            "https://creativecommons.org/licenses/by/4.0/"
          ]
        }
      },
      "required": [
        "text",
        "url",
        "license_url"
      ]
    },
    "record_type": {
      "type": "string",
      "enum": [
        "plan_list"
      ]
    },
    "pricing_enabled": {
      "type": "boolean"
    },
    "plans": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "audience": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "available": {
            "type": "boolean"
          },
          "price": {
            "type": "object",
            "properties": {},
            "additionalProperties": {}
          },
          "highlights": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "grants": {
            "type": "object",
            "properties": {},
            "additionalProperties": {}
          },
          "quotas": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "meter": {
                  "type": "string"
                },
                "limit": {
                  "type": [
                    "number",
                    "null"
                  ]
                }
              },
              "required": [
                "meter",
                "limit"
              ],
              "additionalProperties": {}
            }
          }
        },
        "required": [
          "id",
          "name",
          "audience",
          "status",
          "available",
          "price",
          "highlights",
          "grants",
          "quotas"
        ],
        "additionalProperties": {}
      }
    }
  },
  "required": [
    "credit",
    "record_type",
    "pricing_enabled",
    "plans"
  ]
}