{
  "openapi": "3.1.0",
  "info": {
    "title": "OpenAPI definition",
    "version": "v0"
  },
  "servers": [
    {
      "url": "http://localhost:8080",
      "description": "Generated server url"
    }
  ],
  "paths": {
    "/api/v1/questionnaires/{id}/draft": {
      "put": {
        "tags": [
          "management-controller"
        ],
        "operationId": "updateDraft",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Definition"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/QuestionnaireDetail"
                }
              }
            }
          }
        }
      }
    },
    "/public/v1/responses/{responseId}/files": {
      "post": {
        "tags": [
          "file-controller"
        ],
        "operationId": "upload",
        "parameters": [
          {
            "name": "responseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "questionCode",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Origin",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/FileReference"
                }
              }
            }
          }
        }
      }
    },
    "/public/v1/responses/{responseId}/complete": {
      "post": {
        "tags": [
          "public-controller"
        ],
        "operationId": "complete",
        "parameters": [
          {
            "name": "responseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Origin",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/public/v1/questionnaires/{publicId}/responses": {
      "post": {
        "tags": [
          "public-controller"
        ],
        "operationId": "createResponse",
        "parameters": [
          {
            "name": "publicId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Origin",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "User-Agent",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateResponseRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/CreateResponseResult"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/questionnaires": {
      "get": {
        "tags": [
          "management-controller"
        ],
        "operationId": "list",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/PageResultQuestionnaireSummary"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "management-controller"
        ],
        "operationId": "create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateQuestionnaireRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/QuestionnaireDetail"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/questionnaires/{id}/versions/{n}/restore": {
      "post": {
        "tags": [
          "management-controller"
        ],
        "operationId": "restore",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "n",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/QuestionnaireDetail"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/questionnaires/{id}/publish": {
      "post": {
        "tags": [
          "management-controller"
        ],
        "operationId": "publish",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublishRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/QuestionnaireDetail"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/questionnaires/{id}/duplicate": {
      "post": {
        "tags": [
          "management-controller"
        ],
        "operationId": "duplicate",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/QuestionnaireDetail"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/questionnaires/import": {
      "post": {
        "tags": [
          "management-controller"
        ],
        "operationId": "importQuestionnaire",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuestionnaireImportRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/QuestionnaireDetail"
                }
              }
            }
          }
        }
      }
    },
    "/public/v1/responses/{responseId}": {
      "get": {
        "tags": [
          "public-controller"
        ],
        "operationId": "rehydrate",
        "parameters": [
          {
            "name": "responseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Origin",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseRehydration"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "public-controller"
        ],
        "operationId": "patchResponse",
        "parameters": [
          {
            "name": "responseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Origin",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchResponseRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/questionnaires/{id}": {
      "get": {
        "tags": [
          "management-controller"
        ],
        "operationId": "get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/QuestionnaireDetail"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "management-controller"
        ],
        "operationId": "delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          }
        }
      },
      "patch": {
        "tags": [
          "management-controller"
        ],
        "operationId": "patch",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchQuestionnaireRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/QuestionnaireDetail"
                }
              }
            }
          }
        }
      }
    },
    "/public/v1/questionnaires/{publicId}/ref-status": {
      "get": {
        "tags": [
          "public-controller"
        ],
        "operationId": "refStatus",
        "parameters": [
          {
            "name": "publicId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ref",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Origin",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/RefStatus"
                }
              }
            }
          }
        }
      }
    },
    "/public/v1/questionnaires/{publicId}/live": {
      "get": {
        "tags": [
          "public-controller"
        ],
        "operationId": "live",
        "parameters": [
          {
            "name": "publicId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Origin",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/LiveQuestionnaire"
                }
              }
            }
          }
        }
      }
    },
    "/public/v1/geocode": {
      "get": {
        "tags": [
          "geocode-controller"
        ],
        "operationId": "geocode",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Origin",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/GeocodeSuggestion"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/uploads/config": {
      "get": {
        "tags": [
          "file-controller"
        ],
        "operationId": "uploadsConfig",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/UploadsConfig"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/questionnaires/{id}/versions": {
      "get": {
        "tags": [
          "management-controller"
        ],
        "operationId": "versions",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/VersionSummary"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/questionnaires/{id}/versions/{n}": {
      "get": {
        "tags": [
          "management-controller"
        ],
        "operationId": "version",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "n",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/VersionDetail"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/questionnaires/{id}/responses": {
      "get": {
        "tags": [
          "management-controller"
        ],
        "operationId": "listResponses",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "versionNumber",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "externalRef",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/PageResultResponseExport"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/questionnaires/{id}/responses/{responseId}/files/{fileId}": {
      "get": {
        "tags": [
          "file-controller"
        ],
        "operationId": "download",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "responseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/questionnaires/{id}/responses/export.csv": {
      "get": {
        "tags": [
          "management-controller"
        ],
        "operationId": "exportCsv",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "versionNumber",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "externalRef",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/questionnaires/{id}/files/stats": {
      "get": {
        "tags": [
          "file-controller"
        ],
        "operationId": "stats",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/FileStats"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/questionnaires/{id}/export": {
      "get": {
        "tags": [
          "management-controller"
        ],
        "operationId": "export",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/QuestionnaireExport"
                }
              }
            }
          }
        }
      }
    },
    "/public/v1/responses/{responseId}/files/{fileId}": {
      "delete": {
        "tags": [
          "file-controller"
        ],
        "operationId": "delete_1",
        "parameters": [
          {
            "name": "responseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Origin",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          }
        }
      }
    },
    "/api/v1/questionnaires/{id}/responses/{responseId}": {
      "delete": {
        "tags": [
          "management-controller"
        ],
        "operationId": "deleteResponse",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "responseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Condition": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string"
          },
          "questionCode": {
            "type": "string"
          },
          "subField": {
            "type": "string"
          },
          "operator": {
            "type": "string"
          },
          "value": {}
        }
      },
      "Definition": {
        "type": "object",
        "properties": {
          "schemaVersion": {
            "type": "integer",
            "format": "int32"
          },
          "steps": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Step"
            }
          },
          "tabs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Tab"
            }
          },
          "questions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Question"
            }
          }
        }
      },
      "Question": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "sectionTitle": {
            "type": "string"
          },
          "prompt": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "width": {
            "type": "string"
          },
          "typeConfig": {
            "type": "object",
            "additionalProperties": {}
          },
          "visibility": {
            "$ref": "#/components/schemas/RuleConfig"
          },
          "requirement": {
            "$ref": "#/components/schemas/RuleConfig"
          }
        }
      },
      "Rule": {
        "type": "object",
        "properties": {
          "combinator": {
            "type": "string"
          },
          "conditions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Condition"
            }
          }
        }
      },
      "RuleConfig": {
        "type": "object",
        "properties": {
          "mode": {
            "type": "string"
          },
          "rule": {
            "$ref": "#/components/schemas/Rule"
          }
        }
      },
      "Step": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "visibility": {
            "$ref": "#/components/schemas/RuleConfig"
          },
          "requirement": {
            "$ref": "#/components/schemas/RuleConfig"
          },
          "tabs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Tab"
            }
          },
          "questions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Question"
            }
          }
        }
      },
      "Tab": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "visibility": {
            "$ref": "#/components/schemas/RuleConfig"
          },
          "requirement": {
            "$ref": "#/components/schemas/RuleConfig"
          },
          "questions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Question"
            }
          }
        }
      },
      "QuestionnaireDetail": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "publicId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "allowedOrigins": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "submissionPolicy": {
            "type": "string"
          },
          "currentVersion": {
            "type": "integer",
            "format": "int32"
          },
          "hasUnpublishedChanges": {
            "type": "boolean"
          },
          "draft": {
            "$ref": "#/components/schemas/Definition"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "FileReference": {
        "type": "object",
        "properties": {
          "fileId": {
            "type": "string"
          },
          "fileName": {
            "type": "string"
          },
          "size": {
            "type": "integer",
            "format": "int64"
          },
          "contentType": {
            "type": "string"
          }
        }
      },
      "CreateResponseRequest": {
        "type": "object",
        "properties": {
          "versionNumber": {
            "type": "integer",
            "format": "int32"
          },
          "externalRef": {
            "type": "string"
          }
        }
      },
      "CreateResponseResult": {
        "type": "object",
        "properties": {
          "responseId": {
            "type": "string"
          }
        }
      },
      "CreateQuestionnaireRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "name"
        ]
      },
      "PublishRequest": {
        "type": "object",
        "properties": {
          "note": {
            "type": "string"
          }
        }
      },
      "QuestionnaireImportRequest": {
        "type": "object",
        "properties": {
          "formsEngineExport": {
            "type": "integer",
            "format": "int32"
          },
          "exportedAt": {
            "type": "string",
            "format": "date-time"
          },
          "name": {
            "type": "string"
          },
          "definition": {
            "$ref": "#/components/schemas/Definition"
          }
        }
      },
      "PatchResponseRequest": {
        "type": "object",
        "properties": {
          "answers": {
            "type": "object",
            "additionalProperties": {}
          },
          "lastPosition": {
            "$ref": "#/components/schemas/PositionDto"
          }
        }
      },
      "PositionDto": {
        "type": "object",
        "properties": {
          "stepId": {
            "type": "string"
          },
          "tabId": {
            "type": "string"
          }
        }
      },
      "PatchQuestionnaireRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "allowedOrigins": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "submissionPolicy": {
            "type": "string"
          }
        }
      },
      "ResponseRehydration": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string"
          },
          "versionNumber": {
            "type": "integer",
            "format": "int32"
          },
          "answers": {
            "type": "object",
            "additionalProperties": {}
          },
          "lastPosition": {
            "$ref": "#/components/schemas/PositionDto"
          },
          "definition": {
            "$ref": "#/components/schemas/Definition"
          },
          "submissionPolicy": {
            "type": "string"
          }
        }
      },
      "RefStatus": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string"
          }
        }
      },
      "LiveQuestionnaire": {
        "type": "object",
        "properties": {
          "publicId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "versionNumber": {
            "type": "integer",
            "format": "int32"
          },
          "definition": {
            "$ref": "#/components/schemas/Definition"
          },
          "submissionPolicy": {
            "type": "string"
          }
        }
      },
      "GeocodeSuggestion": {
        "type": "object",
        "properties": {
          "line1": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "postalCode": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "label": {
            "type": "string"
          }
        }
      },
      "UploadsConfig": {
        "type": "object",
        "properties": {
          "maxFileSizeMb": {
            "type": "integer",
            "format": "int32"
          },
          "maxFilesPerResponse": {
            "type": "integer",
            "format": "int32"
          },
          "maxBytesPerResponse": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "PageResultQuestionnaireSummary": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/QuestionnaireSummary"
            }
          },
          "page": {
            "type": "integer",
            "format": "int32"
          },
          "size": {
            "type": "integer",
            "format": "int32"
          },
          "total": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "QuestionnaireSummary": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "publicId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "currentVersion": {
            "type": "integer",
            "format": "int32"
          },
          "hasUnpublishedChanges": {
            "type": "boolean"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "responseCount": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "VersionSummary": {
        "type": "object",
        "properties": {
          "versionNumber": {
            "type": "integer",
            "format": "int32"
          },
          "note": {
            "type": "string"
          },
          "publishedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "VersionDetail": {
        "type": "object",
        "properties": {
          "versionNumber": {
            "type": "integer",
            "format": "int32"
          },
          "note": {
            "type": "string"
          },
          "publishedAt": {
            "type": "string",
            "format": "date-time"
          },
          "definition": {
            "$ref": "#/components/schemas/Definition"
          }
        }
      },
      "Meta": {
        "type": "object",
        "properties": {
          "origin": {
            "type": "string"
          },
          "userAgent": {
            "type": "string"
          }
        }
      },
      "PageResultResponseExport": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ResponseExport"
            }
          },
          "page": {
            "type": "integer",
            "format": "int32"
          },
          "size": {
            "type": "integer",
            "format": "int32"
          },
          "total": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "Position": {
        "type": "object",
        "properties": {
          "stepId": {
            "type": "string"
          },
          "tabId": {
            "type": "string"
          }
        }
      },
      "ResponseExport": {
        "type": "object",
        "properties": {
          "responseId": {
            "type": "string"
          },
          "externalRef": {
            "type": "string"
          },
          "publicId": {
            "type": "string"
          },
          "versionNumber": {
            "type": "integer",
            "format": "int32"
          },
          "status": {
            "type": "string"
          },
          "answers": {
            "type": "object",
            "additionalProperties": {}
          },
          "lastPosition": {
            "$ref": "#/components/schemas/Position"
          },
          "meta": {
            "$ref": "#/components/schemas/Meta"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "completedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "FileStats": {
        "type": "object",
        "properties": {
          "fileCount": {
            "type": "integer",
            "format": "int64"
          },
          "totalBytes": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "QuestionnaireExport": {
        "type": "object",
        "properties": {
          "formsEngineExport": {
            "type": "integer",
            "format": "int32"
          },
          "exportedAt": {
            "type": "string",
            "format": "date-time"
          },
          "name": {
            "type": "string"
          },
          "definition": {
            "$ref": "#/components/schemas/Definition"
          }
        }
      }
    }
  }
}