{
  "openapi": "3.0.4",
  "info": {
    "title": "Nazovsim Portal Web Bff",
    "description": "",
    "version": "v1"
  },
  "paths": {
    "/api/collections": {
      "get": {
        "tags": [
          "Collections"
        ],
        "operationId": "GetAllCollections",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CollectionModel"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CollectionModel"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CollectionModel"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/files/upload/{fileId}": {
      "post": {
        "tags": [
          "Files"
        ],
        "operationId": "UploadFile",
        "parameters": [
          {
            "name": "fileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expectedFileTypes",
            "in": "query",
            "description": "\n\n0 = Unknown\n\n1 = Image\n\n2 = Video\n\n3 = Audio\n\n4 = Document\n\n6 = Other",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/FileType"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              },
              "application/json": {
                "schema": {
                  "type": "string"
                }
              },
              "text/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/files/multi-upload/{uploadId}": {
      "post": {
        "tags": [
          "Files"
        ],
        "operationId": "MultiUploadFiles",
        "parameters": [
          {
            "name": "uploadId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expectedFileTypes",
            "in": "query",
            "description": "\n\n0 = Unknown\n\n1 = Image\n\n2 = Video\n\n3 = Audio\n\n4 = Document\n\n6 = Other",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/FileType"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/FileInformation"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/FileInformation"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/FileInformation"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/files/max-upload-size/{fileType}": {
      "get": {
        "tags": [
          "Files"
        ],
        "operationId": "GetMaxUploadSize",
        "parameters": [
          {
            "name": "fileType",
            "in": "path",
            "description": "\n\n0 = Unknown\n\n1 = Image\n\n2 = Video\n\n3 = Audio\n\n4 = Document\n\n6 = Other",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/FileType"
            },
            "x-enumNames": [
              "Unknown",
              "Image",
              "Video",
              "Audio",
              "Document",
              "Other"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "integer",
                  "format": "int64"
                }
              },
              "application/json": {
                "schema": {
                  "type": "integer",
                  "format": "int64"
                }
              },
              "text/json": {
                "schema": {
                  "type": "integer",
                  "format": "int64"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/files/info/{fileId}": {
      "get": {
        "tags": [
          "Files"
        ],
        "operationId": "GetFileInformation",
        "parameters": [
          {
            "name": "fileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/FileInformation"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileInformation"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileInformation"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/files/download/{fileId}": {
      "get": {
        "tags": [
          "Files"
        ],
        "operationId": "DownloadFile",
        "parameters": [
          {
            "name": "fileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "originalVideoFormat",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "thumbnail",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "videoStreaming",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/json": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "text/json": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/manuscripts/by-section/{sectionId}": {
      "get": {
        "tags": [
          "Manuscripts"
        ],
        "operationId": "GetAllManuscripts",
        "parameters": [
          {
            "name": "sectionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ManuscriptModel"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ManuscriptModel"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ManuscriptModel"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/manuscripts/{manuscriptId}": {
      "get": {
        "tags": [
          "Manuscripts"
        ],
        "operationId": "GetManuscriptDetailsById",
        "parameters": [
          {
            "name": "manuscriptId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ManuscriptModel"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManuscriptModel"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManuscriptModel"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/sections/by-collection/{collectionId}": {
      "get": {
        "tags": [
          "Sections"
        ],
        "operationId": "GetAllSections",
        "parameters": [
          {
            "name": "collectionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SectionModel"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SectionModel"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SectionModel"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "CollectionModel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "coverId": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "orderIndex": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "Error": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "nullable": true
          },
          "message": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "FileInformation": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "fullName": {
            "type": "string",
            "nullable": true
          },
          "diskName": {
            "type": "string",
            "nullable": true
          },
          "extension": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "$ref": "#/components/schemas/FileType"
          },
          "createdOnUtc": {
            "$ref": "#/components/schemas/Timestamp"
          },
          "previousExtension": {
            "type": "string",
            "nullable": true
          },
          "applicationId": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "FileType": {
        "enum": [
          0,
          1,
          2,
          3,
          4,
          6
        ],
        "type": "integer",
        "description": "\n\n0 = Unknown\n\n1 = Image\n\n2 = Video\n\n3 = Audio\n\n4 = Document\n\n6 = Other",
        "format": "int32",
        "x-enumNames": [
          "Unknown",
          "Image",
          "Video",
          "Audio",
          "Document",
          "Other"
        ]
      },
      "ManuscriptModel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "sectionId": {
            "type": "string",
            "nullable": true
          },
          "collectionId": {
            "type": "string",
            "nullable": true
          },
          "coverId": {
            "type": "string",
            "nullable": true
          },
          "collectionTitle": {
            "type": "string",
            "nullable": true
          },
          "basisForAttribution": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "lecturer": {
            "type": "string",
            "nullable": true
          },
          "startYear": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "endYear": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "institution": {
            "type": "string",
            "nullable": true
          },
          "summary": {
            "type": "string",
            "nullable": true
          },
          "code": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32"
          },
          "fileIds": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SectionModel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "collectionId": {
            "type": "string",
            "nullable": true
          },
          "coverId": {
            "type": "string",
            "nullable": true
          },
          "startYear": {
            "type": "integer",
            "format": "int32"
          },
          "endYear": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "Timestamp": {
        "type": "object",
        "properties": {
          "seconds": {
            "type": "integer",
            "format": "int64"
          },
          "nanos": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      }
    }
  }
}