{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://loop.firmiana.si/api/v1/schemas/plans.schema.json",
  "title": "Compact list of AI subscription plans (api/v1/plans.json). Full records: /plans/v1/plans.json",
  "type": "object",
  "additionalProperties": false,
  "required": ["schema", "version", "generated_at", "license", "plans"],
  "properties": {
    "schema": { "type": "string", "format": "uri" }, "version": { "const": 1 }, "generated_at": { "type": "string", "format": "date-time" }, "license": { "const": "CC-BY-4.0" },
    "plans": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": ["key", "vendor", "vendor_name", "product", "product_name", "plan", "plan_name", "plan_name_zh", "category", "audience", "free", "currency", "monthly", "annual", "monthly_usd_equiv", "source", "verified"],
        "properties": {
          "key": { "type": "string" },
          "vendor": { "type": "string" },
          "vendor_name": { "type": "string" },
          "product": { "type": "string" },
          "product_name": { "type": "string" },
          "plan": { "type": "string" },
          "plan_name": { "type": "string" },
          "plan_name_zh": { "type": "string" },
          "category": { "type": "string" },
          "audience": { "type": "string" },
          "free": { "type": "boolean" },
          "currency": { "type": ["string", "null"] },
          "monthly": { "type": ["number", "string", "null"], "description": "Monthly list price in currency; 'unverified' when not confirmed" },
          "annual": { "type": ["number", "string", "null"] },
          "monthly_usd_equiv": { "type": ["number", "null"] },
          "source": { "type": ["string", "null"], "format": "uri" },
          "verified": { "type": "string", "format": "date" }
        }
      }
    }
  }
}
