{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/citi/json-schema/citi-rfi-save-request-schema.json",
  "title": "RfiSaveRequest",
  "description": "Request body for responding to an RFI.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/citi-rfi-api-openapi.yml#/components/schemas/Rfi-Save-Request",
  "type": "object",
  "required": [
    "rfi_id",
    "questions"
  ],
  "properties": {
    "rfi_id": {
      "$ref": "#/$defs/Rfi-Id"
    },
    "questions": {
      "type": "array",
      "title": "questions",
      "description": "An array of questions to respond to.",
      "minItems": 1,
      "maxItems": 100,
      "items": {
        "$ref": "#/$defs/Questions-Request"
      }
    }
  },
  "$defs": {
    "Answer": {
      "type": "string",
      "title": "answer",
      "minLength": 1,
      "maxLength": 2048,
      "description": "The answer for the information request."
    },
    "Common-Information-Request": {
      "title": "CommonInformationRequest",
      "type": "object",
      "description": "Information item that needs to be responded to in an RFI.",
      "properties": {
        "information_name": {
          "$ref": "#/$defs/Information-Name"
        },
        "answer": {
          "$ref": "#/$defs/Answer"
        }
      }
    },
    "Information-Name": {
      "type": "string",
      "title": "information_name",
      "minLength": 1,
      "maxLength": 64,
      "description": "Information name."
    },
    "Information-Request": {
      "title": "InformationRequest",
      "description": "Information item that needs to be responded to in an RFI.",
      "allOf": [
        {
          "$ref": "#/$defs/Common-Information-Request"
        },
        {
          "type": "object",
          "title": "Information-Request",
          "required": [
            "information_name"
          ]
        }
      ]
    },
    "Question-Id": {
      "type": "string",
      "title": "question_id",
      "minLength": 1,
      "maxLength": 64,
      "description": "The unique id for specific question."
    },
    "Questions-Request": {
      "title": "QuestionRequest",
      "type": "object",
      "description": "A question with response information for RFI submission.",
      "required": [
        "question_id",
        "information_request"
      ],
      "properties": {
        "question_id": {
          "$ref": "#/$defs/Question-Id"
        },
        "information_request": {
          "type": "array",
          "title": "information_request",
          "description": "The information to be responded to.",
          "minItems": 1,
          "maxItems": 100,
          "items": {
            "$ref": "#/$defs/Information-Request"
          }
        }
      }
    },
    "Rfi-Id": {
      "type": "string",
      "title": "rfi_id",
      "minLength": 1,
      "maxLength": 128,
      "description": "RFI unique id."
    }
  }
}