1 line
18 KiB
JSON
1 line
18 KiB
JSON
{"openapi": "3.1.0", "info": {"title": "materia", "version": "0.1.0"}, "paths": {"/api/auth/signup": {"post": {"tags": ["auth"], "summary": "Signup", "operationId": "auth_signup", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserCredentials"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/auth/signin": {"post": {"tags": ["auth"], "summary": "Signin", "operationId": "auth_signin", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserCredentials"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/auth/signout": {"get": {"tags": ["auth"], "summary": "Signout", "operationId": "auth_signout", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/oauth2/authorize": {"post": {"tags": ["oauth2"], "summary": "Authorize", "operationId": "oauth2_authorize", "requestBody": {"content": {"application/x-www-form-urlencoded": {"schema": {"$ref": "#/components/schemas/Body_authorize_api_oauth2_authorize_post"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/oauth2/access_token": {"post": {"tags": ["oauth2"], "summary": "Token", "operationId": "oauth2_token", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/user": {"get": {"tags": ["user"], "summary": "Info", "operationId": "user_info", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserInfo"}}}}}}, "delete": {"tags": ["user"], "summary": "Remove", "operationId": "user_remove", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/user/avatar": {"put": {"tags": ["user"], "summary": "Avatar", "operationId": "user_avatar", "requestBody": {"content": {"multipart/form-data": {"schema": {"$ref": "#/components/schemas/Body_avatar_api_user_avatar_put"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "delete": {"tags": ["user"], "summary": "Remove Avatar", "operationId": "user_remove_avatar", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/repository": {"get": {"tags": ["repository"], "summary": "Info", "operationId": "repository_info", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RepositoryInfo"}}}}}}, "post": {"tags": ["repository"], "summary": "Create", "operationId": "repository_create", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}, "delete": {"tags": ["repository"], "summary": "Remove", "operationId": "repository_remove", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/repository/content": {"get": {"tags": ["repository"], "summary": "Content", "operationId": "repository_content", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RepositoryContent"}}}}}}}, "/api/directory": {"post": {"tags": ["directory"], "summary": "Create", "operationId": "directory_create", "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DirectoryPath"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "get": {"tags": ["directory"], "summary": "Info", "operationId": "directory_info", "parameters": [{"name": "path", "in": "query", "required": true, "schema": {"type": "string", "format": "path", "title": "Path"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "delete": {"tags": ["directory"], "summary": "Remove", "operationId": "directory_remove", "parameters": [{"name": "path", "in": "query", "required": true, "schema": {"type": "string", "format": "path", "title": "Path"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/directory/rename": {"patch": {"tags": ["directory"], "summary": "Rename", "operationId": "directory_rename", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/DirectoryRename"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/directory/move": {"patch": {"tags": ["directory"], "summary": "Move", "operationId": "directory_move", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/DirectoryCopyMove"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/directory/copy": {"post": {"tags": ["directory"], "summary": "Copy", "operationId": "directory_copy", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/DirectoryCopyMove"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/directory/content": {"get": {"tags": ["directory"], "summary": "Content", "operationId": "directory_content", "parameters": [{"name": "path", "in": "query", "required": true, "schema": {"type": "string", "format": "path", "title": "Path"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DirectoryContent"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/file": {"post": {"tags": ["file"], "summary": "Create", "operationId": "file_create", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}, "requestBody": {"content": {"multipart/form-data": {"schema": {"required": ["file", "path"], "type": "object", "properties": {"file": {"type": "string", "format": "binary"}, "path": {"type": "string", "format": "path", "example": "/"}}}}}, "required": true}}, "get": {"tags": ["file"], "summary": "Info", "operationId": "file_info", "parameters": [{"name": "path", "in": "query", "required": true, "schema": {"type": "string", "format": "path", "title": "Path"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/FileInfo"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "delete": {"tags": ["file"], "summary": "Remove", "operationId": "file_remove", "parameters": [{"name": "path", "in": "query", "required": true, "schema": {"type": "string", "format": "path", "title": "Path"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/file/rename": {"patch": {"tags": ["file"], "summary": "Rename", "operationId": "file_rename", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/FileRename"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/file/move": {"patch": {"tags": ["file"], "summary": "Move", "operationId": "file_move", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/FileCopyMove"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/file/copy": {"post": {"tags": ["file"], "summary": "Copy", "operationId": "file_copy", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/FileCopyMove"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/avatar/{avatar_id}": {"get": {"tags": ["avatar"], "summary": "Avatar", "operationId": "avatar_avatar", "parameters": [{"name": "avatar_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Avatar Id"}}, {"name": "format", "in": "query", "required": false, "schema": {"type": "string", "default": "png", "title": "Format"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}}, "components": {"schemas": {"Body_authorize_api_oauth2_authorize_post": {"properties": {"redirect_uri": {"type": "string", "maxLength": 2083, "minLength": 1, "format": "uri", "title": "Redirect Uri"}, "client_id": {"type": "string", "title": "Client Id"}, "scope": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Scope"}, "state": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "State"}, "response_type": {"type": "string", "title": "Response Type", "default": "code"}, "grant_type": {"type": "string", "pattern": "password", "title": "Grant Type", "default": "authorization_code"}}, "type": "object", "required": ["redirect_uri", "client_id"], "title": "Body_authorize_api_oauth2_authorize_post"}, "Body_avatar_api_user_avatar_put": {"properties": {"file": {"type": "string", "format": "binary", "title": "File"}}, "type": "object", "required": ["file"], "title": "Body_avatar_api_user_avatar_put"}, "DirectoryContent": {"properties": {"files": {"items": {"$ref": "#/components/schemas/FileInfo"}, "type": "array", "title": "Files"}, "directories": {"items": {"$ref": "#/components/schemas/DirectoryInfo"}, "type": "array", "title": "Directories"}}, "type": "object", "required": ["files", "directories"], "title": "DirectoryContent"}, "DirectoryCopyMove": {"properties": {"path": {"type": "string", "format": "path", "title": "Path"}, "target": {"type": "string", "format": "path", "title": "Target"}, "force": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Force", "default": false}}, "type": "object", "required": ["path", "target"], "title": "DirectoryCopyMove"}, "DirectoryInfo": {"properties": {"id": {"type": "integer", "title": "Id"}, "repository_id": {"type": "integer", "title": "Repository Id"}, "parent_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Parent Id"}, "created": {"type": "integer", "title": "Created"}, "updated": {"type": "integer", "title": "Updated"}, "name": {"type": "string", "title": "Name"}, "is_public": {"type": "boolean", "title": "Is Public"}, "path": {"anyOf": [{"type": "string", "format": "path"}, {"type": "null"}], "title": "Path"}, "used": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Used"}}, "type": "object", "required": ["id", "repository_id", "parent_id", "created", "updated", "name", "is_public"], "title": "DirectoryInfo"}, "DirectoryPath": {"properties": {"path": {"type": "string", "format": "path", "title": "Path"}}, "type": "object", "required": ["path"], "title": "DirectoryPath"}, "DirectoryRename": {"properties": {"path": {"type": "string", "format": "path", "title": "Path"}, "name": {"type": "string", "title": "Name"}, "force": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Force", "default": false}}, "type": "object", "required": ["path", "name"], "title": "DirectoryRename"}, "FileCopyMove": {"properties": {"path": {"type": "string", "format": "path", "title": "Path"}, "target": {"type": "string", "format": "path", "title": "Target"}, "force": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Force", "default": false}}, "type": "object", "required": ["path", "target"], "title": "FileCopyMove"}, "FileInfo": {"properties": {"id": {"type": "integer", "title": "Id"}, "repository_id": {"type": "integer", "title": "Repository Id"}, "parent_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Parent Id"}, "created": {"type": "integer", "title": "Created"}, "updated": {"type": "integer", "title": "Updated"}, "name": {"type": "string", "title": "Name"}, "is_public": {"type": "boolean", "title": "Is Public"}, "size": {"type": "integer", "title": "Size"}, "path": {"anyOf": [{"type": "string", "format": "path"}, {"type": "null"}], "title": "Path"}}, "type": "object", "required": ["id", "repository_id", "parent_id", "created", "updated", "name", "is_public", "size"], "title": "FileInfo"}, "FileRename": {"properties": {"path": {"type": "string", "format": "path", "title": "Path"}, "name": {"type": "string", "title": "Name"}, "force": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Force", "default": false}}, "type": "object", "required": ["path", "name"], "title": "FileRename"}, "HTTPValidationError": {"properties": {"detail": {"items": {"$ref": "#/components/schemas/ValidationError"}, "type": "array", "title": "Detail"}}, "type": "object", "title": "HTTPValidationError"}, "LoginType": {"type": "integer", "enum": [1, 2, 3], "title": "LoginType"}, "RepositoryContent": {"properties": {"files": {"items": {"$ref": "#/components/schemas/FileInfo"}, "type": "array", "title": "Files"}, "directories": {"items": {"$ref": "#/components/schemas/DirectoryInfo"}, "type": "array", "title": "Directories"}}, "type": "object", "required": ["files", "directories"], "title": "RepositoryContent"}, "RepositoryInfo": {"properties": {"id": {"type": "integer", "title": "Id"}, "capacity": {"type": "integer", "title": "Capacity"}, "used": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Used"}}, "type": "object", "required": ["id", "capacity"], "title": "RepositoryInfo"}, "UserCredentials": {"properties": {"name": {"type": "string", "title": "Name"}, "password": {"type": "string", "title": "Password"}, "email": {"anyOf": [{"type": "string", "format": "email"}, {"type": "null"}], "title": "Email"}}, "type": "object", "required": ["name", "password", "email"], "title": "UserCredentials"}, "UserInfo": {"properties": {"id": {"type": "string", "format": "uuid", "title": "Id"}, "name": {"type": "string", "title": "Name"}, "lower_name": {"type": "string", "title": "Lower Name"}, "full_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Full Name"}, "email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Email"}, "is_email_private": {"type": "boolean", "title": "Is Email Private"}, "must_change_password": {"type": "boolean", "title": "Must Change Password"}, "login_type": {"$ref": "#/components/schemas/LoginType"}, "created": {"type": "integer", "title": "Created"}, "updated": {"type": "integer", "title": "Updated"}, "last_login": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Last Login"}, "is_active": {"type": "boolean", "title": "Is Active"}, "is_admin": {"type": "boolean", "title": "Is Admin"}, "avatar": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Avatar"}}, "type": "object", "required": ["id", "name", "lower_name", "full_name", "email", "is_email_private", "must_change_password", "login_type", "created", "updated", "last_login", "is_active", "is_admin", "avatar"], "title": "UserInfo"}, "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"}}}} |