{
  "openapi": "3.0.4",
  "info": {
    "title": "BizTrack.Resources.Api",
    "version": "1.0"
  },
  "paths": {
    "/url/{id}": {
      "get": {
        "tags": [
          "Resource"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/url": {
      "post": {
        "tags": [
          "Resource"
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/UrlRequest"
                }
              }
            },
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/UrlRequest"
                }
              }
            },
            "text/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/UrlRequest"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/UrlRequest"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/file/{id}": {
      "get": {
        "tags": [
          "Resource"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "quality",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "width",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "height",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "contentDispositon",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/ContentDisposition"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "Resource"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/file": {
      "post": {
        "tags": [
          "Resource"
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/FileRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FileRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/FileRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/FileRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/files": {
      "post": {
        "tags": [
          "Resource"
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FileRequest"
                }
              }
            },
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FileRequest"
                }
              }
            },
            "text/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FileRequest"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FileRequest"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/upload": {
      "post": {
        "tags": [
          "Resource"
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    }
                  },
                  "timesToBeUsed": {
                    "type": "integer",
                    "format": "int32"
                  },
                  "quality": {
                    "type": "integer",
                    "format": "int32"
                  },
                  "width": {
                    "type": "integer",
                    "format": "int32"
                  },
                  "height": {
                    "type": "integer",
                    "format": "int32"
                  },
                  "compressImage": {
                    "type": "boolean",
                    "default": true
                  }
                }
              },
              "encoding": {
                "files": {
                  "style": "form"
                },
                "timesToBeUsed": {
                  "style": "form"
                },
                "quality": {
                  "style": "form"
                },
                "width": {
                  "style": "form"
                },
                "height": {
                  "style": "form"
                },
                "compressImage": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/file/bulk/{ids}": {
      "delete": {
        "tags": [
          "Resource"
        ],
        "parameters": [
          {
            "name": "ids",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/zip": {
      "post": {
        "tags": [
          "Resource"
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/ResourceZipRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResourceZipRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ResourceZipRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ResourceZipRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "get": {
        "tags": [
          "Resource"
        ],
        "parameters": [
          {
            "name": "fileName",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fileId",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ContentDisposition": {
        "enum": [
          1,
          2
        ],
        "type": "integer",
        "format": "int32"
      },
      "FileRequest": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "file": {
            "type": "string",
            "format": "byte",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "timesToBeUsed": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "quality": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "width": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "height": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "compressImage": {
            "type": "boolean",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ResourceZipRequest": {
        "type": "object",
        "properties": {
          "fileName": {
            "type": "string",
            "nullable": true
          },
          "fileIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "UrlRequest": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "nullable": true
          },
          "timesToBeUsed": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "publicResource": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      }
    }
  },
  "tags": [
    {
      "name": "Resource"
    }
  ]
}