Files
FileCodeBoxFronted/openapi.json
2025-02-23 20:29:36 +08:00

782 lines
23 KiB
JSON

{
"openapi": "3.1.0",
"info": { "title": "FastAPI", "version": "0.1.0" },
"paths": {
"/share/text/": {
"post": {
"tags": ["分享"],
"summary": "Share Text",
"operationId": "share_text_share_text__post",
"parameters": [
{
"name": "authorization",
"in": "header",
"required": false,
"schema": { "type": "string", "title": "Authorization" }
}
],
"requestBody": {
"required": true,
"content": {
"application/x-www-form-urlencoded": {
"schema": { "$ref": "#/components/schemas/Body_share_text_share_text__post" }
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": { "application/json": { "schema": {} } }
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/HTTPValidationError" }
}
}
}
}
}
},
"/share/file/": {
"post": {
"tags": ["分享"],
"summary": "Share File",
"operationId": "share_file_share_file__post",
"parameters": [
{
"name": "authorization",
"in": "header",
"required": false,
"schema": { "type": "string", "title": "Authorization" }
}
],
"requestBody": {
"required": true,
"content": {
"multipart/form-data": {
"schema": { "$ref": "#/components/schemas/Body_share_file_share_file__post" }
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": { "application/json": { "schema": {} } }
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/HTTPValidationError" }
}
}
}
}
}
},
"/share/select/": {
"get": {
"tags": ["分享"],
"summary": "Get Code File",
"operationId": "get_code_file_share_select__get",
"parameters": [
{
"name": "code",
"in": "query",
"required": true,
"schema": { "type": "string", "title": "Code" }
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": { "application/json": { "schema": {} } }
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/HTTPValidationError" }
}
}
}
}
},
"post": {
"tags": ["分享"],
"summary": "Select File",
"operationId": "select_file_share_select__post",
"requestBody": {
"required": true,
"content": {
"application/json": { "schema": { "$ref": "#/components/schemas/SelectFileModel" } }
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": { "application/json": { "schema": {} } }
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/HTTPValidationError" }
}
}
}
}
}
},
"/share/download": {
"get": {
"tags": ["分享"],
"summary": "Download File",
"operationId": "download_file_share_download_get",
"parameters": [
{
"name": "key",
"in": "query",
"required": true,
"schema": { "type": "string", "title": "Key" }
},
{
"name": "code",
"in": "query",
"required": true,
"schema": { "type": "string", "title": "Code" }
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": { "application/json": { "schema": {} } }
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/HTTPValidationError" }
}
}
}
}
}
},
"/chunk/upload/init/": {
"post": {
"tags": ["切片"],
"summary": "Init Chunk Upload",
"operationId": "init_chunk_upload_chunk_upload_init__post",
"requestBody": {
"content": {
"application/x-www-form-urlencoded": {
"schema": {
"$ref": "#/components/schemas/Body_init_chunk_upload_chunk_upload_init__post"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": { "application/json": { "schema": {} } }
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/HTTPValidationError" }
}
}
}
}
}
},
"/chunk/upload/chunk/{upload_id}/{chunk_index}": {
"post": {
"tags": ["切片"],
"summary": "Upload Chunk",
"operationId": "upload_chunk_chunk_upload_chunk__upload_id___chunk_index__post",
"parameters": [
{
"name": "upload_id",
"in": "path",
"required": true,
"schema": { "type": "string", "title": "Upload Id" }
},
{
"name": "chunk_index",
"in": "path",
"required": true,
"schema": { "type": "integer", "title": "Chunk Index" }
}
],
"requestBody": {
"required": true,
"content": {
"multipart/form-data": {
"schema": {
"$ref": "#/components/schemas/Body_upload_chunk_chunk_upload_chunk__upload_id___chunk_index__post"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": { "application/json": { "schema": {} } }
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/HTTPValidationError" }
}
}
}
}
}
},
"/chunk/upload/complete/{upload_id}": {
"post": {
"tags": ["切片"],
"summary": "Complete Upload",
"operationId": "complete_upload_chunk_upload_complete__upload_id__post",
"parameters": [
{
"name": "upload_id",
"in": "path",
"required": true,
"schema": { "type": "string", "title": "Upload Id" }
}
],
"requestBody": {
"required": true,
"content": {
"application/x-www-form-urlencoded": {
"schema": {
"$ref": "#/components/schemas/Body_complete_upload_chunk_upload_complete__upload_id__post"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": { "application/json": { "schema": {} } }
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/HTTPValidationError" }
}
}
}
}
}
},
"/admin/login": {
"post": {
"tags": ["管理"],
"summary": "Login",
"operationId": "login_admin_login_post",
"requestBody": {
"content": {
"application/json": { "schema": { "$ref": "#/components/schemas/LoginData" } }
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": { "application/json": { "schema": {} } }
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/HTTPValidationError" }
}
}
}
}
}
},
"/admin/dashboard": {
"get": {
"tags": ["管理"],
"summary": "Dashboard",
"operationId": "dashboard_admin_dashboard_get",
"parameters": [
{
"name": "authorization",
"in": "header",
"required": false,
"schema": { "type": "string", "title": "Authorization" }
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": { "application/json": { "schema": {} } }
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/HTTPValidationError" }
}
}
}
}
}
},
"/admin/file/delete": {
"delete": {
"tags": ["管理"],
"summary": "File Delete",
"operationId": "file_delete_admin_file_delete_delete",
"parameters": [
{
"name": "authorization",
"in": "header",
"required": false,
"schema": { "type": "string", "title": "Authorization" }
}
],
"requestBody": {
"required": true,
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/IDData" } } }
},
"responses": {
"200": {
"description": "Successful Response",
"content": { "application/json": { "schema": {} } }
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/HTTPValidationError" }
}
}
}
}
}
},
"/admin/file/list": {
"get": {
"tags": ["管理"],
"summary": "File List",
"operationId": "file_list_admin_file_list_get",
"parameters": [
{
"name": "page",
"in": "query",
"required": false,
"schema": { "type": "integer", "default": 1, "title": "Page" }
},
{
"name": "size",
"in": "query",
"required": false,
"schema": { "type": "integer", "default": 10, "title": "Size" }
},
{
"name": "keyword",
"in": "query",
"required": false,
"schema": { "type": "string", "default": "", "title": "Keyword" }
},
{
"name": "authorization",
"in": "header",
"required": false,
"schema": { "type": "string", "title": "Authorization" }
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": { "application/json": { "schema": {} } }
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/HTTPValidationError" }
}
}
}
}
}
},
"/admin/config/get": {
"get": {
"tags": ["管理"],
"summary": "Get Config",
"operationId": "get_config_admin_config_get_get",
"parameters": [
{
"name": "authorization",
"in": "header",
"required": false,
"schema": { "type": "string", "title": "Authorization" }
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": { "application/json": { "schema": {} } }
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/HTTPValidationError" }
}
}
}
}
}
},
"/admin/config/update": {
"patch": {
"tags": ["管理"],
"summary": "Update Config",
"operationId": "update_config_admin_config_update_patch",
"parameters": [
{
"name": "authorization",
"in": "header",
"required": false,
"schema": { "type": "string", "title": "Authorization" }
}
],
"requestBody": {
"required": true,
"content": { "application/json": { "schema": { "type": "object", "title": "Data" } } }
},
"responses": {
"200": {
"description": "Successful Response",
"content": { "application/json": { "schema": {} } }
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/HTTPValidationError" }
}
}
}
}
}
},
"/admin/file/download": {
"get": {
"tags": ["管理"],
"summary": "File Download",
"operationId": "file_download_admin_file_download_get",
"parameters": [
{
"name": "id",
"in": "query",
"required": true,
"schema": { "type": "integer", "title": "Id" }
},
{
"name": "authorization",
"in": "header",
"required": false,
"schema": { "type": "string", "title": "Authorization" }
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": { "application/json": { "schema": {} } }
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/HTTPValidationError" }
}
}
}
}
}
},
"/admin/local/lists": {
"get": {
"tags": ["管理"],
"summary": "Get Local Lists",
"operationId": "get_local_lists_admin_local_lists_get",
"parameters": [
{
"name": "authorization",
"in": "header",
"required": false,
"schema": { "type": "string", "title": "Authorization" }
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": { "application/json": { "schema": {} } }
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/HTTPValidationError" }
}
}
}
}
}
},
"/admin/local/delete": {
"delete": {
"tags": ["管理"],
"summary": "Delete Local File",
"operationId": "delete_local_file_admin_local_delete_delete",
"parameters": [
{
"name": "authorization",
"in": "header",
"required": false,
"schema": { "type": "string", "title": "Authorization" }
}
],
"requestBody": {
"required": true,
"content": {
"application/json": { "schema": { "$ref": "#/components/schemas/DeleteItem" } }
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": { "application/json": { "schema": {} } }
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/HTTPValidationError" }
}
}
}
}
}
},
"/admin/local/share": {
"post": {
"tags": ["管理"],
"summary": "Share Local File",
"operationId": "share_local_file_admin_local_share_post",
"parameters": [
{
"name": "authorization",
"in": "header",
"required": false,
"schema": { "type": "string", "title": "Authorization" }
}
],
"requestBody": {
"required": true,
"content": {
"application/json": { "schema": { "$ref": "#/components/schemas/ShareItem" } }
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": { "application/json": { "schema": {} } }
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/HTTPValidationError" }
}
}
}
}
}
},
"/": {
"get": {
"summary": "Index",
"operationId": "index__get",
"parameters": [
{ "name": "request", "in": "query", "required": false, "schema": { "title": "Request" } },
{ "name": "exc", "in": "query", "required": false, "schema": { "title": "Exc" } }
],
"responses": {
"200": {
"description": "Successful Response",
"content": { "application/json": { "schema": {} } }
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/HTTPValidationError" }
}
}
}
}
},
"post": {
"summary": "Get Config",
"operationId": "get_config__post",
"responses": {
"200": {
"description": "Successful Response",
"content": { "application/json": { "schema": {} } }
}
}
}
},
"/robots.txt": {
"get": {
"summary": "Robots",
"operationId": "robots_robots_txt_get",
"responses": {
"200": {
"description": "Successful Response",
"content": { "application/json": { "schema": {} } }
}
}
}
}
},
"components": {
"schemas": {
"Body_complete_upload_chunk_upload_complete__upload_id__post": {
"properties": {
"expire_value": { "type": "integer", "title": "Expire Value" },
"expire_style": { "type": "string", "title": "Expire Style" }
},
"type": "object",
"required": ["expire_value", "expire_style"],
"title": "Body_complete_upload_chunk_upload_complete__upload_id__post"
},
"Body_init_chunk_upload_chunk_upload_init__post": {
"properties": {
"file_name": { "type": "string", "title": "File Name" },
"file_size": { "type": "integer", "title": "File Size" },
"chunk_size": { "type": "integer", "title": "Chunk Size", "default": 5242880 },
"file_hash": { "type": "string", "title": "File Hash" }
},
"type": "object",
"required": ["file_name", "file_size", "file_hash"],
"title": "Body_init_chunk_upload_chunk_upload_init__post"
},
"Body_share_file_share_file__post": {
"properties": {
"expire_value": {
"type": "integer",
"exclusiveMinimum": 0.0,
"title": "Expire Value",
"default": 1
},
"expire_style": { "type": "string", "title": "Expire Style", "default": "day" },
"file": { "type": "string", "format": "binary", "title": "File" }
},
"type": "object",
"required": ["file"],
"title": "Body_share_file_share_file__post"
},
"Body_share_text_share_text__post": {
"properties": {
"text": { "type": "string", "title": "Text" },
"expire_value": {
"type": "integer",
"exclusiveMinimum": 0.0,
"title": "Expire Value",
"default": 1
},
"expire_style": { "type": "string", "title": "Expire Style", "default": "day" }
},
"type": "object",
"required": ["text"],
"title": "Body_share_text_share_text__post"
},
"Body_upload_chunk_chunk_upload_chunk__upload_id___chunk_index__post": {
"properties": { "chunk": { "type": "string", "format": "binary", "title": "Chunk" } },
"type": "object",
"required": ["chunk"],
"title": "Body_upload_chunk_chunk_upload_chunk__upload_id___chunk_index__post"
},
"DeleteItem": {
"properties": { "filename": { "type": "string", "title": "Filename" } },
"type": "object",
"required": ["filename"],
"title": "DeleteItem"
},
"HTTPValidationError": {
"properties": {
"detail": {
"items": { "$ref": "#/components/schemas/ValidationError" },
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
},
"IDData": {
"properties": { "id": { "type": "integer", "title": "Id" } },
"type": "object",
"required": ["id"],
"title": "IDData"
},
"LoginData": {
"properties": { "password": { "type": "string", "title": "Password" } },
"type": "object",
"required": ["password"],
"title": "LoginData"
},
"SelectFileModel": {
"properties": { "code": { "type": "string", "title": "Code" } },
"type": "object",
"required": ["code"],
"title": "SelectFileModel"
},
"ShareItem": {
"properties": {
"expire_value": { "type": "integer", "title": "Expire Value" },
"expire_style": { "type": "string", "title": "Expire Style", "default": "day" },
"filename": { "type": "string", "title": "Filename" }
},
"type": "object",
"required": ["expire_value", "filename"],
"title": "ShareItem"
},
"ValidationError": {
"properties": {
"loc": {
"items": { "anyOf": [{ "type": "string" }, { "type": "integer" }] },
"type": "array",
"title": "Location"
},
"msg": { "type": "string", "title": "Message" },
"type": { "type": "string", "title": "Error Type" }
},
"type": "object",
"required": ["loc", "msg", "type"],
"title": "ValidationError"
}
}
}
}