{
  "openapi" : "3.0.1",
  "info" : {
    "title" : "XPlanDokumenteAPI",
    "description" : "XPlanDokumente REST API",
    "termsOfService" : "",
    "contact" : {
      "email" : ""
    },
    "license" : {
      "name" : "Apache 2.0",
      "url" : "http://www.apache.org/licenses/LICENSE-2.0.html"
    },
    "version" : "1.0.0"
  },
  "servers" : [ {
    "url" : "/xplan-dokumente-api/xdokumente/api/v1"
  } ],
  "security" : [ {
    "Bearer" : [ ]
  } ],
  "tags" : [ {
    "name" : "download",
    "description" : "Download XPlanDokumente",
    "externalDocs" : {
      "description" : "xPlanBox",
      "url" : ""
    }
  } ],
  "paths" : {
    "/dokument/{planId}" : {
      "get" : {
        "tags" : [ "download" ],
        "summary" : "List documents",
        "description" : "List all documents of the plan",
        "operationId" : "listDocuments",
        "parameters" : [ {
          "name" : "planId",
          "in" : "path",
          "description" : "ID of the plan to return document",
          "required" : true,
          "schema" : {
            "type" : "string"
          },
          "example" : 123
        } ],
        "responses" : {
          "200" : {
            "description" : "Documents"
          },
          "400" : {
            "description" : "Invalid input"
          },
          "404" : {
            "description" : "Invalid planID"
          }
        }
      }
    },
    "/info" : {
      "get" : {
        "summary" : "Show system and application configuration",
        "description" : "Returns the system and application configuration",
        "operationId" : "showConfig",
        "responses" : {
          "200" : {
            "description" : "successful operation",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/SystemConfig"
                }
              }
            }
          },
          "406" : {
            "description" : "Requested format is not available"
          }
        }
      }
    },
    "/dokument/{planId}/{fileName}" : {
      "get" : {
        "tags" : [ "download" ],
        "summary" : "Download document",
        "description" : "Download a document",
        "operationId" : "getDocument",
        "parameters" : [ {
          "name" : "planId",
          "in" : "path",
          "description" : "ID of the plan to return document",
          "required" : true,
          "schema" : {
            "type" : "string"
          },
          "example" : 123
        }, {
          "name" : "fileName",
          "in" : "path",
          "description" : "Name of the document",
          "required" : true,
          "schema" : {
            "type" : "string"
          },
          "example" : 123
        } ],
        "responses" : {
          "200" : {
            "description" : "Document"
          },
          "400" : {
            "description" : "Invalid input"
          },
          "404" : {
            "description" : "Invalid planID or fileName, document not found"
          }
        }
      },
      "head" : {
        "tags" : [ "download" ],
        "summary" : "Show download header",
        "description" : "Download a document",
        "operationId" : "headDocument",
        "parameters" : [ {
          "name" : "planId",
          "in" : "path",
          "description" : "ID of the plan to return document",
          "required" : true,
          "schema" : {
            "type" : "string"
          },
          "example" : 123
        }, {
          "name" : "fileName",
          "in" : "path",
          "description" : "Name of the document",
          "required" : true,
          "schema" : {
            "type" : "string"
          },
          "example" : 123
        } ],
        "responses" : {
          "200" : {
            "description" : "Document"
          },
          "400" : {
            "description" : "Invalid input"
          },
          "404" : {
            "description" : "Invalid planID or fileName, document not found"
          }
        }
      }
    },
    "/" : {
      "get" : {
        "summary" : "OpenAPI document",
        "description" : "API documentation",
        "operationId" : "openApi",
        "responses" : {
          "200" : {
            "description" : "successful operation",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "object"
                }
              }
            }
          },
          "406" : {
            "description" : "Requested format is not available"
          }
        }
      }
    }
  },
  "components" : {
    "schemas" : {
      "SystemConfig" : {
        "type" : "object",
        "properties" : {
          "version" : {
            "type" : "string",
            "description" : "Version der xPlanBox",
            "example" : "v3.4.0"
          }
        }
      }
    },
    "securitySchemes" : {
      "Bearer" : {
        "type" : "http",
        "scheme" : "bearer",
        "bearerFormat" : "JWT"
      }
    }
  }
}