{
  "openapi": "3.1.1",
  "info": {
    "title": "DocRegister.Web | v1",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "http://www.doc-register.eu/"
    }
  ],
  "paths": {
    "/api/CreateDocEntry": {
      "post": {
        "tags": [
          "DocEntries"
        ],
        "parameters": [
          {
            "name": "X-API-Key",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "DocId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "Type": {
                    "type": "string"
                  },
                  "Content": {
                    "$ref": "#/components/schemas/IFormFile"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "text/plain": {
                "schema": { }
              },
              "application/json": {
                "schema": { }
              },
              "text/json": {
                "schema": { }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable"
          }
        }
      }
    },
    "/api/doc-entries": {
      "post": {
        "tags": [
          "DocEntries"
        ],
        "parameters": [
          {
            "name": "X-API-Key",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "DocId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "Type": {
                    "type": "string"
                  },
                  "Content": {
                    "$ref": "#/components/schemas/IFormFile"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "text/plain": {
                "schema": { }
              },
              "application/json": {
                "schema": { }
              },
              "text/json": {
                "schema": { }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable"
          }
        }
      }
    },
    "/show": {
      "get": {
        "tags": [
          "DocEntries"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/FileContentResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileContentResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileContentResult"
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "EntityTagHeaderValue": {
        "type": "object",
        "properties": {
          "tag": {
            "$ref": "#/components/schemas/StringSegment"
          },
          "isWeak": {
            "type": "boolean"
          }
        }
      },
      "FileContentResult": {
        "type": "object",
        "properties": {
          "fileContents": {
            "type": "string",
            "format": "byte"
          },
          "contentType": {
            "type": [
              "null",
              "string"
            ]
          },
          "fileDownloadName": {
            "type": [
              "null",
              "string"
            ]
          },
          "lastModified": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "entityTag": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/EntityTagHeaderValue"
              }
            ]
          },
          "enableRangeProcessing": {
            "type": "boolean"
          }
        }
      },
      "IFormFile": {
        "type": "string",
        "format": "binary"
      },
      "ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": [
              "null",
              "string"
            ]
          },
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "detail": {
            "type": [
              "null",
              "string"
            ]
          },
          "instance": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "StringSegment": {
        "type": "object",
        "properties": {
          "buffer": {
            "type": [
              "null",
              "string"
            ]
          },
          "offset": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "length": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "value": {
            "type": [
              "null",
              "string"
            ]
          },
          "hasValue": {
            "type": "boolean"
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "DocEntries"
    }
  ]
}