{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/wordlift-io/json-schema/wordlift-io-question-and-answer-set-schema.json",
  "title": "QuestionAndAnswerSet",
  "description": "Generated Q&A content.",
  "x-generated": "2026-11-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/wordlift-io-content-generation.yml#/components/schemas/QuestionAndAnswerSet",
  "type": "object",
  "properties": {
    "created_entity_gaps": {
      "type": "array",
      "description": "Entity Gaps created for the Web Page.",
      "items": {
        "type": "string",
        "description": "Entity Gaps created for the Web Page."
      },
      "uniqueItems": true
    },
    "id": {
      "type": "string",
      "description": "The unique id.",
      "readOnly": true
    },
    "is_smart_content_of": {
      "type": "string",
      "description": "The Web Page this smart content is created for."
    },
    "published": {
      "type": "boolean",
      "description": "The published status of the smart content.",
      "readOnly": true
    },
    "questions_and_answers": {
      "type": "array",
      "description": "The generated questions and answers.",
      "items": {
        "$ref": "#/$defs/QuestionAndAnswer"
      }
    },
    "selected_entity_gaps": {
      "type": "array",
      "description": "Entity Gaps used to generate the Smart Content.",
      "items": {
        "type": "string",
        "description": "Entity Gaps used to generate the Smart Content."
      },
      "uniqueItems": true
    },
    "smart_content_project_id": {
      "type": "integer",
      "format": "int64"
    },
    "url": {
      "type": "string",
      "description": "The URL of the Web Page this smart content is created for."
    }
  },
  "$defs": {
    "AcceptedAnswer": {
      "type": "object",
      "properties": {
        "answer": {
          "type": "string"
        }
      }
    },
    "LevelEnum": {
      "type": "string",
      "description": "The rule level.",
      "enum": [
        "RECOMMENDED",
        "REQUIRED"
      ]
    },
    "QuestionAndAnswer": {
      "type": "object",
      "description": "Generated Q&A content.",
      "properties": {
        "accepted_answer": {
          "$ref": "#/$defs/AcceptedAnswer"
        },
        "answer": {
          "type": "string",
          "description": "The generated answer."
        },
        "errors": {
          "type": "array",
          "description": "The set of errors found for the answer.",
          "items": {
            "$ref": "#/$defs/ValidationResult"
          },
          "readOnly": true
        },
        "id": {
          "type": "string",
          "description": "The unique id.",
          "readOnly": true
        },
        "question": {
          "type": "string",
          "description": "The generated question."
        },
        "warnings": {
          "type": "array",
          "description": "The set of warnings found for the answer.",
          "items": {
            "$ref": "#/$defs/ValidationResult"
          },
          "readOnly": true
        }
      },
      "required": [
        "errors",
        "warnings"
      ]
    },
    "ValidationResult": {
      "type": "object",
      "description": "The set of warnings found for the answer.",
      "properties": {
        "levelEnum": {
          "$ref": "#/$defs/LevelEnum"
        },
        "name": {
          "type": "string"
        },
        "result": {
          "type": "string",
          "enum": [
            "PASS",
            "FAIL",
            "SKIP",
            "FIXED"
          ]
        }
      },
      "readOnly": true
    }
  }
}