{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/popp/json-schema/popp-update-requirements-input-schema.json",
  "title": "UpdateRequirementsInput",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/popp-analysis-api-openapi.yml#/components/schemas/UpdateRequirementsInput",
  "type": "object",
  "required": [
    "requirements"
  ],
  "properties": {
    "requirements": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "required": [
          "text"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The requirement ID. Include to update an existing requirement. Omit to create a new one. Existing requirements not included in the array will be deleted."
          },
          "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."
          }
        }
      },
      "description": "The full set of requirements. This replaces all existing requirements."
    }
  },
  "additionalProperties": false
}