{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/knossot-org/json-schema/knossot-org-recommendation-response-schema.json",
  "title": "RecommendationResponse",
  "x-generated": "2026-11-13",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/knossot-org-openapi.json#/components/schemas/RecommendationResponse",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "run",
    "picks"
  ],
  "properties": {
    "replayed": {
      "type": "boolean"
    },
    "run": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "credits_charged_usd",
        "window"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "funding": {
          "type": "string",
          "enum": [
            "free",
            "credits"
          ]
        },
        "credits_charged_usd": {
          "type": "number"
        },
        "max_picks_applied": {
          "type": "integer"
        },
        "candidates_considered": {
          "type": "integer"
        },
        "edition_generated_at": {
          "type": "string"
        },
        "window": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "from",
            "to"
          ],
          "properties": {
            "from": {
              "type": "string"
            },
            "to": {
              "type": "string"
            }
          }
        }
      }
    },
    "picks": {
      "type": "array",
      "maxItems": 5,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "event",
          "why"
        ],
        "properties": {
          "event": {
            "$ref": "#/$defs/Event"
          },
          "why": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      }
    }
  },
  "$defs": {
    "Event": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "key",
        "title",
        "start_time",
        "knossot_url"
      ],
      "properties": {
        "key": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "start_time": {
          "type": "string",
          "format": "date-time"
        },
        "end_time": {
          "type": [
            "string",
            "null"
          ]
        },
        "all_day": {
          "type": "boolean"
        },
        "time_zone": {
          "type": [
            "string",
            "null"
          ]
        },
        "venue": {
          "type": [
            "string",
            "null"
          ]
        },
        "address": {
          "type": [
            "string",
            "null"
          ]
        },
        "town": {
          "type": [
            "string",
            "null"
          ]
        },
        "categories": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "is_free": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "description": {
          "type": [
            "string",
            "null"
          ]
        },
        "image_url": {
          "type": [
            "string",
            "null"
          ]
        },
        "source": {
          "type": [
            "string",
            "null"
          ]
        },
        "source_url": {
          "type": [
            "string",
            "null"
          ]
        },
        "rsvp_url": {
          "type": [
            "string",
            "null"
          ]
        },
        "knossot_url": {
          "type": "string",
          "format": "uri"
        }
      }
    }
  }
}