{
  "openapi": "3.0.1",
  "info": {
    "title": "Written Questions Service API",
    "description": "Data around written questions and answers, as well as written ministerial statements.",
    "contact": {
      "name": "UK Parliament",
      "url": "https://www.parliament.uk",
      "email": "softwareengineering@parliament.uk"
    },
    "version": "v1"
  },
  "paths": {
    "/api/dailyreports/dailyreports": {
      "get": {
        "tags": [
          "DailyReports"
        ],
        "summary": "Returns a list of daily reports",
        "parameters": [
          {
            "name": "dateFrom",
            "in": "query",
            "description": "Daily report with report date on or after the date specified. Date format yyyy-mm-dd",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "dateTo",
            "in": "query",
            "description": "Daily report with report date on or before the date specified. Date format yyyy-mm-dd",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "house",
            "in": "query",
            "description": "Daily report relating to the House specified. Defaults to Bicameral",
            "schema": {
              "$ref": "#/components/schemas/HouseEnum"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "description": "Number of records to skip, default is 0",
            "schema": {
              "maximum": 2147483647,
              "minimum": 0,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "take",
            "in": "query",
            "description": "Number of records to take, default is 20",
            "schema": {
              "maximum": 2147483647,
              "minimum": 0,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "includeTotalResults",
            "in": "query",
            "description": "Whether to return the total number of matching results. Defaults to true.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DailyReportViewModelSearchResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DailyReportViewModelSearchResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DailyReportViewModelSearchResult"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/writtenquestions/questions": {
      "get": {
        "tags": [
          "WrittenQuestions"
        ],
        "summary": "Returns a list of written questions",
        "parameters": [
          {
            "name": "askingMemberId",
            "in": "query",
            "description": "Written questions asked by member with member ID specified",
            "schema": {
              "maximum": 2147483647,
              "minimum": 1,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "answeringMemberId",
            "in": "query",
            "description": "Written questions answered by member with member ID specified",
            "schema": {
              "maximum": 2147483647,
              "minimum": 1,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "tabledWhenFrom",
            "in": "query",
            "description": "Written questions tabled on or after the date specified. Date format yyyy-mm-dd",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "dateForAnswerWhenFrom",
            "in": "query",
            "description": "Written questions DateForAnswer on or after the date specified format yyyy-mm-dd",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "dateForAnswerWhenTo",
            "in": "query",
            "description": "Written questions DateForAnswer on or before the date specified format yyyy-mm-dd",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "tabledWhenTo",
            "in": "query",
            "description": "Written questions tabled on or before the date specified. Date format yyyy-mm-dd",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "answered",
            "in": "query",
            "description": "Written questions that have been answered, unanswered or either.",
            "schema": {
              "$ref": "#/components/schemas/Answered"
            }
          },
          {
            "name": "answeredWhenFrom",
            "in": "query",
            "description": "Written questions answered on or after the date specified. Date format yyyy-mm-dd",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "answeredWhenTo",
            "in": "query",
            "description": "Written questions answered on or before the date specified. Date format yyyy-mm-dd",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "questionStatus",
            "in": "query",
            "description": "Written questions with the status specified",
            "schema": {
              "$ref": "#/components/schemas/QuestionStatusEnum"
            }
          },
          {
            "name": "includeWithdrawn",
            "in": "query",
            "description": "Include written questions that have been withdrawn",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "expandMember",
            "in": "query",
            "description": "Expand the details of Members in the results",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "correctedWhenFrom",
            "in": "query",
            "description": "Written questions corrected on or after the date specified. Date format yyyy-mm-dd",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "correctedWhenTo",
            "in": "query",
            "description": "Written questions corrected on or before the date specified. Date format yyyy-mm-dd",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "sessionStatus",
            "in": "query",
            "description": "The Session status for which the Questions data will be returned",
            "schema": {
              "$ref": "#/components/schemas/SessionStatus"
            }
          },
          {
            "name": "includeTotalResults",
            "in": "query",
            "description": "Whether to return the total number of matching results. Defaults to true.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "searchTerm",
            "in": "query",
            "description": "Written questions / statements containing the search term specified, searches item content",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "uIN",
            "in": "query",
            "description": "Written questions / statements with the uin specified",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "answeringBodies",
            "in": "query",
            "description": "Written questions / statements relating to the answering bodies with the IDs specified",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "members",
            "in": "query",
            "description": "Written questions / statements relating to the members with the IDs specified",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "house",
            "in": "query",
            "description": "Written questions / statements relating to the House specified",
            "schema": {
              "$ref": "#/components/schemas/HouseEnum"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "description": "Number of records to skip, default is 0",
            "schema": {
              "maximum": 2147483647,
              "minimum": 0,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "take",
            "in": "query",
            "description": "Number of records to take, default is 20",
            "schema": {
              "maximum": 2147483647,
              "minimum": 0,
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/QuestionsViewModelSearchResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuestionsViewModelSearchResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuestionsViewModelSearchResult"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/writtenquestions/questions/{id}": {
      "get": {
        "tags": [
          "WrittenQuestions"
        ],
        "summary": "Returns a written question",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "written question with ID specified",
            "required": true,
            "schema": {
              "minimum": 0,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "expandMember",
            "in": "query",
            "description": "Expand the details of Members in the result",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "sessionStatus",
            "in": "query",
            "description": "Session status to get the Questions data for",
            "schema": {
              "$ref": "#/components/schemas/SessionStatus"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/QuestionsViewModelItem"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuestionsViewModelItem"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuestionsViewModelItem"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/writtenquestions/questions/{date}/{uin}": {
      "get": {
        "tags": [
          "WrittenQuestions"
        ],
        "summary": "Returns a written question",
        "parameters": [
          {
            "name": "date",
            "in": "path",
            "description": "Written question on date specified",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "uin",
            "in": "path",
            "description": "Written question with uid specified",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expandMember",
            "in": "query",
            "description": "Expand the details of Members in the results",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "sessionStatus",
            "in": "query",
            "description": "Session status to get the Questions data for",
            "schema": {
              "$ref": "#/components/schemas/SessionStatus"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/QuestionsViewModelItem"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuestionsViewModelItem"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuestionsViewModelItem"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/writtenstatements/statements": {
      "get": {
        "tags": [
          "WrittenStatements"
        ],
        "summary": "Returns a list of written statements",
        "parameters": [
          {
            "name": "madeWhenFrom",
            "in": "query",
            "description": "Written statements made on or after the date specified. Date format yyyy-mm-dd",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "madeWhenTo",
            "in": "query",
            "description": "Written statements made on or before the date specified. Date format yyyy-mm-dd",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "sessionStatus",
            "in": "query",
            "description": "The Session status for which the Written statements data will be returned",
            "schema": {
              "$ref": "#/components/schemas/SessionStatus"
            }
          },
          {
            "name": "includeTotalResults",
            "in": "query",
            "description": "Whether to return the total number of matching results. Defaults to true.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "searchTerm",
            "in": "query",
            "description": "Written questions / statements containing the search term specified, searches item content",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "uIN",
            "in": "query",
            "description": "Written questions / statements with the uin specified",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "answeringBodies",
            "in": "query",
            "description": "Written questions / statements relating to the answering bodies with the IDs specified",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "members",
            "in": "query",
            "description": "Written questions / statements relating to the members with the IDs specified",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "house",
            "in": "query",
            "description": "Written questions / statements relating to the House specified",
            "schema": {
              "$ref": "#/components/schemas/HouseEnum"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "description": "Number of records to skip, default is 0",
            "schema": {
              "maximum": 2147483647,
              "minimum": 0,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "take",
            "in": "query",
            "description": "Number of records to take, default is 20",
            "schema": {
              "maximum": 2147483647,
              "minimum": 0,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "expandMember",
            "in": "query",
            "description": "Expand the details of Members in the results",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/StatementsViewModelSearchResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatementsViewModelSearchResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatementsViewModelSearchResult"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/writtenstatements/statements/{id}": {
      "get": {
        "tags": [
          "WrittenStatements"
        ],
        "summary": "Returns a written statement",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Written statement with ID specified",
            "required": true,
            "schema": {
              "minimum": 0,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "expandMember",
            "in": "query",
            "description": "Expand the details of Members in the results",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "sessionStatus",
            "in": "query",
            "description": "Session status to filter the Written statement records",
            "schema": {
              "$ref": "#/components/schemas/SessionStatus"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/StatementsViewModelSearchResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatementsViewModelSearchResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatementsViewModelSearchResult"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/writtenstatements/statements/{date}/{uin}": {
      "get": {
        "tags": [
          "WrittenStatements"
        ],
        "summary": "Returns a written statemnet",
        "parameters": [
          {
            "name": "date",
            "in": "path",
            "description": "Written statement on date specified",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "uin",
            "in": "path",
            "description": "Written statement with uid specified",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expandMember",
            "in": "query",
            "description": "Expand the details of Members in the results",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "sessionStatus",
            "in": "query",
            "description": "Session status to filter the Written statement records",
            "schema": {
              "$ref": "#/components/schemas/SessionStatus"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/StatementsViewModelItem"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatementsViewModelItem"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatementsViewModelItem"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Answered": {
        "enum": [
          "Any",
          "Answered",
          "Unanswered"
        ],
        "type": "string"
      },
      "AttachmentViewModel": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "fileType": {
            "type": "string",
            "nullable": true
          },
          "fileSizeBytes": {
            "type": "integer",
            "format": "int64"
          }
        },
        "additionalProperties": false
      },
      "DailyReportViewModel": {
        "type": "object",
        "properties": {
          "house": {
            "$ref": "#/components/schemas/HouseEnum"
          },
          "date": {
            "type": "string",
            "format": "date-time"
          },
          "fileSizeBytes": {
            "type": "integer",
            "format": "int64"
          },
          "url": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DailyReportViewModelItem": {
        "type": "object",
        "properties": {
          "value": {
            "$ref": "#/components/schemas/DailyReportViewModel"
          },
          "links": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Link"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DailyReportViewModelSearchResult": {
        "type": "object",
        "properties": {
          "totalResults": {
            "type": "integer",
            "description": "Total number of results matching the query",
            "format": "int32",
            "nullable": true
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DailyReportViewModelItem"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GroupedQuestionViewModel": {
        "type": "object",
        "properties": {
          "questionUin": {
            "type": "string",
            "nullable": true
          },
          "dateTabled": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "HouseEnum": {
        "enum": [
          "Bicameral",
          "Commons",
          "Lords"
        ],
        "type": "string"
      },
      "Link": {
        "type": "object",
        "properties": {
          "rel": {
            "type": "string",
            "nullable": true
          },
          "href": {
            "type": "string",
            "nullable": true
          },
          "method": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "LinkedStatements": {
        "type": "object",
        "properties": {
          "linkedStatementId": {
            "type": "integer",
            "format": "int32"
          },
          "linkType": {
            "$ref": "#/components/schemas/StatementLinkTypeEnum"
          },
          "linkDate": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "MemberViewModel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "listAs": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "party": {
            "type": "string",
            "nullable": true
          },
          "partyColour": {
            "type": "string",
            "nullable": true
          },
          "partyAbbreviation": {
            "type": "string",
            "nullable": true
          },
          "memberFrom": {
            "type": "string",
            "nullable": true
          },
          "thumbnailUrl": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": { }
      },
      "QuestionStatusEnum": {
        "enum": [
          "NotAnswered",
          "AnsweredOnly",
          "AllQuestions"
        ],
        "type": "string"
      },
      "QuestionsViewModel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "askingMemberId": {
            "type": "integer",
            "format": "int32"
          },
          "askingMember": {
            "$ref": "#/components/schemas/MemberViewModel"
          },
          "house": {
            "$ref": "#/components/schemas/HouseEnum"
          },
          "memberHasInterest": {
            "type": "boolean"
          },
          "dateTabled": {
            "type": "string",
            "format": "date-time"
          },
          "dateForAnswer": {
            "type": "string",
            "format": "date-time"
          },
          "uin": {
            "type": "string",
            "nullable": true
          },
          "questionText": {
            "type": "string",
            "nullable": true
          },
          "answeringBodyId": {
            "type": "integer",
            "format": "int32"
          },
          "answeringBodyName": {
            "type": "string",
            "nullable": true
          },
          "isWithdrawn": {
            "type": "boolean"
          },
          "isNamedDay": {
            "type": "boolean"
          },
          "groupedQuestions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "answerIsHolding": {
            "type": "boolean",
            "nullable": true
          },
          "answerIsCorrection": {
            "type": "boolean",
            "nullable": true
          },
          "answeringMemberId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "answeringMember": {
            "$ref": "#/components/schemas/MemberViewModel"
          },
          "correctingMemberId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "correctingMember": {
            "$ref": "#/components/schemas/MemberViewModel"
          },
          "dateAnswered": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "answerText": {
            "type": "string",
            "nullable": true
          },
          "originalAnswerText": {
            "type": "string",
            "nullable": true
          },
          "comparableAnswerText": {
            "type": "string",
            "nullable": true
          },
          "dateAnswerCorrected": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "dateHoldingAnswer": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "attachmentCount": {
            "type": "integer",
            "format": "int32"
          },
          "heading": {
            "type": "string",
            "nullable": true
          },
          "attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AttachmentViewModel"
            },
            "nullable": true
          },
          "groupedQuestionsDates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GroupedQuestionViewModel"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "QuestionsViewModelItem": {
        "type": "object",
        "properties": {
          "value": {
            "$ref": "#/components/schemas/QuestionsViewModel"
          },
          "links": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Link"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "QuestionsViewModelSearchResult": {
        "type": "object",
        "properties": {
          "totalResults": {
            "type": "integer",
            "description": "Total number of results matching the query",
            "format": "int32",
            "nullable": true
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/QuestionsViewModelItem"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SessionStatus": {
        "enum": [
          "Current",
          "Any"
        ],
        "type": "string"
      },
      "StatementLinkTypeEnum": {
        "enum": [
          "CorrectedStatement",
          "CorrectedAnswer",
          "JointStatement"
        ],
        "type": "string"
      },
      "StatementsViewModel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "memberId": {
            "type": "integer",
            "format": "int32"
          },
          "member": {
            "$ref": "#/components/schemas/MemberViewModel"
          },
          "memberRole": {
            "type": "string",
            "nullable": true
          },
          "uin": {
            "type": "string",
            "nullable": true
          },
          "dateMade": {
            "type": "string",
            "format": "date-time"
          },
          "answeringBodyId": {
            "type": "integer",
            "format": "int32"
          },
          "answeringBodyName": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "text": {
            "type": "string",
            "nullable": true
          },
          "house": {
            "$ref": "#/components/schemas/HouseEnum"
          },
          "noticeNumber": {
            "type": "integer",
            "format": "int32"
          },
          "hasAttachments": {
            "type": "boolean"
          },
          "hasLinkedStatements": {
            "type": "boolean"
          },
          "linkedStatements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LinkedStatements"
            },
            "nullable": true
          },
          "attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AttachmentViewModel"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "StatementsViewModelItem": {
        "type": "object",
        "properties": {
          "value": {
            "$ref": "#/components/schemas/StatementsViewModel"
          },
          "links": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Link"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "StatementsViewModelSearchResult": {
        "type": "object",
        "properties": {
          "totalResults": {
            "type": "integer",
            "description": "Total number of results matching the query",
            "format": "int32",
            "nullable": true
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StatementsViewModelItem"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      }
    }
  }
}