{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://decisioq.local/schemas/recommend-vehicle-class.input.schema.json",
  "title": "Recommend Vehicle Class Input Payload",
  "type": "object",
  "additionalProperties": true,
  "required": [
    "reservations"
  ],
  "properties": {
    "requestContext": {
      "type": "object",
      "additionalProperties": true,
      "properties": {
        "sourceSystem": {
          "type": "string"
        },
        "correlationId": {
          "type": "string"
        }
      }
    },
    "reservations": {
      "type": "array",
      "minItems": 2,
      "items": {
        "type": "object",
        "additionalProperties": true,
        "required": [
          "name",
          "optionId",
          "risk",
          "schedule",
          "vehicle"
        ],
        "properties": {
          "optionId": {
            "type": "string",
            "minLength": 1
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "vehicle": {
            "type": "object",
            "additionalProperties": true,
            "properties": {
              "assignment": {
                "type": "object",
                "additionalProperties": true,
                "properties": {
                  "customerNeedMatch": {
                    "type": "number"
                  },
                  "classAvailabilityFit": {
                    "type": "number"
                  },
                  "upsellReadiness": {
                    "type": "number"
                  },
                  "classRevenuePotential": {
                    "type": "number"
                  }
                }
              }
            }
          },
          "risk": {
            "type": "object",
            "additionalProperties": true,
            "properties": {
              "mismatchRisk": {
                "type": "number"
              }
            }
          },
          "schedule": {
            "type": "object",
            "additionalProperties": true,
            "properties": {
              "bookingLeadTimePressure": {
                "type": "number"
              }
            }
          }
        }
      }
    }
  }
}
