{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/lune/json-schema/lune-bundle-selection-request-schema.json",
  "title": "BundleSelectionRequest",
  "description": "Bundle selection percentages.\n\nThe sum of all percentages must equal 100.\n\nIf not specified, the preconfigured allocation ratios are going to be used.\n\nIf, for each selection, `percentage` is not provided, the selection is divided equally (best effort) between bundles. `percentage` must be provided for all or none of the bundles.\n",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/lune-bundle-selections-api-openapi.yml#/components/schemas/BundleSelectionRequest",
  "type": "array",
  "items": {
    "$ref": "#/$defs/BundlePercentageRequest"
  },
  "$defs": {
    "BundlePercentageRequest": {
      "type": "object",
      "description": "Maps a bundle id to an allocation ratio",
      "required": [
        "bundle_id"
      ],
      "properties": {
        "bundle_id": {
          "type": "string",
          "description": "The bundle's unique identifier"
        },
        "percentage": {
          "oneOf": [
            {
              "type": "integer",
              "x-lune-name": "Selection percentage as integer",
              "description": "Selection percentage"
            },
            {
              "type": "string",
              "pattern": "^[0-9]+(\\.\\d{1,2})?$",
              "x-lune-name": "Selection percentage in decimals",
              "description": "Selection percentage in decimals"
            }
          ]
        }
      }
    }
  }
}