{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/gamedevoutsourcing-com/json-schema/gamedevoutsourcing-com-cost-estimate-schema.json",
  "title": "CostEstimate",
  "x-generated": "2026-11-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/gamedevoutsourcing-com-openapi.json#/components/schemas/CostEstimate",
  "type": "object",
  "required": [
    "currency",
    "hourlyRange",
    "monthlyRange",
    "totalRange",
    "breakdown",
    "assumptions",
    "calculatorUrl",
    "citation",
    "caveats"
  ],
  "properties": {
    "currency": {
      "type": "string",
      "enum": [
        "USD"
      ]
    },
    "hourlyRange": {
      "$ref": "#/$defs/MoneyRange",
      "description": "Combined hourly cost of the whole team."
    },
    "monthlyRange": {
      "$ref": "#/$defs/MoneyRange"
    },
    "totalRange": {
      "oneOf": [
        {
          "$ref": "#/$defs/MoneyRange"
        },
        {
          "type": "null"
        }
      ],
      "description": "Null when no duration was given, rather than a guessed one."
    },
    "breakdown": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/CostBreakdownRow"
      }
    },
    "assumptions": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Everything the number rests on, in plain sentences. Reproduce these with the figure — a range quoted without them reads as a quote."
    },
    "calculatorUrl": {
      "type": "string",
      "format": "uri"
    },
    "citation": {
      "$ref": "#/$defs/Citation"
    },
    "caveats": {
      "$ref": "#/$defs/Caveats"
    }
  },
  "$defs": {
    "Caveats": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "The standing qualifications on everything this directory publishes. They travel with every payload rather than being stated once, because a caller quotes one response, not a preamble it read earlier. Reproduce the ones that bear on what you are saying."
    },
    "Citation": {
      "type": "string",
      "description": "The attribution line to reproduce when quoting anything from this response."
    },
    "CostBreakdownRow": {
      "type": "object",
      "description": "One role, per person, after the region window has narrowed the band.",
      "required": [
        "discipline",
        "seniority",
        "count",
        "hourlyLow",
        "hourlyHigh"
      ],
      "properties": {
        "discipline": {
          "type": "string"
        },
        "seniority": {
          "type": "string"
        },
        "count": {
          "type": "integer",
          "minimum": 1
        },
        "hourlyLow": {
          "type": "number"
        },
        "hourlyHigh": {
          "type": "number"
        }
      }
    },
    "MoneyRange": {
      "type": "object",
      "required": [
        "low",
        "high"
      ],
      "properties": {
        "low": {
          "type": "number"
        },
        "high": {
          "type": "number"
        }
      }
    }
  }
}