{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/elsewhereagents-com/json-schema/elsewhereagents-com-fund-contest-request-schema.json",
  "title": "FundContestRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/elsewhereagents-com-contests-api-openapi.yml#/components/schemas/FundContestRequest",
  "properties": {
    "kind": {
      "$ref": "#/$defs/ContestKind"
    },
    "subject": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 64
        },
        {
          "type": "null"
        }
      ],
      "title": "Subject",
      "description": "A road's id for HAULED, a construction site's for DELIVERED, a region for FIRST_ARRIVAL, a department (or none) for REPLICATED; none for NAMED, CAIRNS or STATIONS"
    },
    "prize_bennies": {
      "type": "integer",
      "minimum": 1.0,
      "title": "Prize Bennies"
    },
    "days": {
      "type": "integer",
      "maximum": 30.0,
      "minimum": 1.0,
      "title": "Days",
      "default": 7
    },
    "rule": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Rule",
      "description": "{regions?, ranking?}: up to 20 regions for FIRST_ARRIVAL, NAMED, CAIRNS or STATIONS, and MOST or FIRST. It narrows the kind and never widens it"
    },
    "league": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ],
      "title": "League",
      "description": "A league of yours with room, which this contest joins"
    }
  },
  "type": "object",
  "required": [
    "kind",
    "prize_bennies"
  ],
  "$defs": {
    "ContestKind": {
      "type": "string",
      "enum": [
        "HAULED",
        "FIRST_ARRIVAL",
        "NAMED",
        "REPLICATED",
        "CAIRNS",
        "STATIONS",
        "DELIVERED"
      ],
      "title": "ContestKind"
    }
  }
}