{
  "swagger": "2.0",
  "info": {
    "title": "OapApiV1",
    "description": "API providing OAP functionality for the application form, calculator and more.\n\n## Heading\n\nUse a primary heading to indicate the member name.",
    "version": "0.0.0",
    "x-identifier": "OapApiV1",
    "x-codegen": "DO NOT EDIT: generated by fsdgenswagger"
  },
  "host": "oaprotection.org",
  "basePath": "/api/v1",
  "schemes": [
    "https"
  ],
  "paths": {
    "/applications": {
      "get": {
        "tags": [
          "bob"
        ],
        "summary": "Gets applications for the current user.",
        "description": "Gets the current user's applications in pages.",
        "operationId": "getApplications",
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "status",
            "description": "Filter applications by the given status.",
            "type": "string",
            "enum": [
              "InProgress",
              "Submitted"
            ]
          },
          {
            "in": "query",
            "name": "limit",
            "description": "The limit of returned results.",
            "type": "integer",
            "format": "int32"
          },
          {
            "in": "query",
            "name": "nextToken",
            "description": "The token presenting the next page of applications to get.",
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "schema": {
              "$ref": "#/definitions/GetApplicationsResponse"
            }
          }
        }
      }
    },
    "/applications/": {
      "post": {
        "summary": "Creates a new application for the current user.",
        "description": "Creates a new application for the current user.",
        "operationId": "createApplication",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "in": "body",
            "name": "request",
            "description": "The application to create.",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ApplicationCreateSet"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The created application.",
            "schema": {
              "$ref": "#/definitions/Application"
            },
            "x-identifier": "application"
          },
          "201": {
            "description": ""
          }
        }
      }
    },
    "/applications/{id}": {
      "get": {
        "summary": "Gets the specified application for the current user.",
        "operationId": "getApplication",
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "The widget ID.",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "The requested widget.",
            "schema": {
              "$ref": "#/definitions/Application"
            },
            "x-identifier": "application"
          },
          "304": {
            "description": "",
            "x-identifier": "notModified"
          }
        }
      },
      "patch": {
        "summary": "Updates the application.",
        "description": "Updates an application for the current user, given the ID of the application to update.",
        "operationId": "updateApplication",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "The application ID.",
            "required": true,
            "type": "string"
          },
          {
            "in": "body",
            "name": "request",
            "description": "The application update set.",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ApplicationChangeSet"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The updated Application.",
            "schema": {
              "$ref": "#/definitions/Application"
            },
            "x-identifier": "application"
          }
        }
      }
    }
  },
  "definitions": {
    "GetApplicationsResponse": {
      "type": "object",
      "properties": {
        "applications": {
          "description": "The applications.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/Application"
          }
        },
        "total": {
          "description": "The total number of applications.",
          "type": "integer",
          "format": "int64"
        },
        "nextToken": {
          "description": "The token representing the next page of results.",
          "type": "string"
        },
        "isLastPage": {
          "description": "True if this is the last page of results, false otherwise.",
          "type": "boolean"
        }
      }
    },
    "ApplicationCreateSet": {
      "type": "object",
      "properties": {
        "terms": {
          "$ref": "#/definitions/ApplicationTermsCreateSet"
        }
      }
    },
    "Application": {
      "description": "An application.",
      "type": "object",
      "properties": {
        "id": {
          "description": "A unique identifier for the application.",
          "type": "string"
        },
        "status": {
          "description": "The current status of this application.",
          "type": "string",
          "enum": [
            "InProgress",
            "Submitted"
          ]
        },
        "terms": {
          "$ref": "#/definitions/ApplicationTerms"
        }
      },
      "x-remarks": "Represents a user's application, whether in progress or submitted."
    },
    "ApplicationChangeSet": {
      "type": "object",
      "properties": {}
    },
    "ApplicationTermsCreateSet": {
      "required": [
        "hasReadInstructions"
      ],
      "type": "object",
      "properties": {
        "hasReadInstructions": {
          "type": "boolean"
        }
      }
    },
    "ApplicationTerms": {
      "type": "object",
      "properties": {
        "hasReadInstructions": {
          "type": "boolean"
        }
      }
    }
  }
}