{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/popp/json-schema/popp-create-analysis-input-schema.json",
  "title": "CreateAnalysisInput",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/popp-analysis-api-openapi.yml#/components/schemas/CreateAnalysisInput",
  "type": "object",
  "required": [
    "title",
    "jobDescription",
    "requirements"
  ],
  "properties": {
    "title": {
      "type": "string",
      "minLength": 1,
      "description": "The title of the analysis."
    },
    "jobDescription": {
      "type": "string",
      "minLength": 1,
      "description": "The full job description text."
    },
    "requirements": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "required": [
          "text"
        ],
        "properties": {
          "text": {
            "type": "string",
            "minLength": 1,
            "description": "The requirement text."
          },
          "isMandatory": {
            "type": "boolean",
            "default": false,
            "description": "Whether this is a knockout requirement."
          },
          "weight": {
            "type": "number",
            "default": 1,
            "description": "Scoring weight for this requirement, as a positive whole number. A fractional weight is accepted but treated as 1."
          }
        }
      },
      "description": "The analysis requirements."
    },
    "externalId": {
      "type": "string",
      "description": "External system identifier."
    }
  },
  "additionalProperties": false
}