From 9ee47c1b7653ca41f47bb7a0ba7637ceb451d976 Mon Sep 17 00:00:00 2001 From: vvbbnn00 Date: Tue, 12 Mar 2024 21:38:39 +0800 Subject: [PATCH] docs: Update API documentation again --- docs/docs.go | 15 +++++++++++++-- docs/swagger.json | 15 +++++++++++++-- docs/swagger.yaml | 10 ++++++++-- 3 files changed, 34 insertions(+), 6 deletions(-) diff --git a/docs/docs.go b/docs/docs.go index 8efe42f..2f71563 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -116,8 +116,8 @@ const docTemplate = `{ } ], "responses": { - "200": { - "description": "OK", + "201": { + "description": "File created", "schema": { "type": "string" } @@ -744,6 +744,12 @@ const docTemplate = `{ "type": "string" } }, + "413": { + "description": "File too large", + "schema": { + "type": "string" + } + }, "500": { "description": "Internal server error", "schema": { @@ -806,6 +812,11 @@ const docTemplate = `{ } }, "delete": { + "security": [ + { + "Authorization": [] + } + ], "description": "Cancel an upload session, {path} should be the relative path of the file, starting from the root directory, e.g. /upload/path/to/file.txt", "tags": [ "Upload" diff --git a/docs/swagger.json b/docs/swagger.json index 4b437dc..158181d 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -109,8 +109,8 @@ } ], "responses": { - "200": { - "description": "OK", + "201": { + "description": "File created", "schema": { "type": "string" } @@ -737,6 +737,12 @@ "type": "string" } }, + "413": { + "description": "File too large", + "schema": { + "type": "string" + } + }, "500": { "description": "Internal server error", "schema": { @@ -799,6 +805,11 @@ } }, "delete": { + "security": [ + { + "Authorization": [] + } + ], "description": "Cancel an upload session, {path} should be the relative path of the file, starting from the root directory, e.g. /upload/path/to/file.txt", "tags": [ "Upload" diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 5dd7690..ea604b2 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -159,8 +159,8 @@ paths: produces: - application/json responses: - "200": - description: OK + "201": + description: File created schema: type: string "400": @@ -582,6 +582,8 @@ paths: description: Internal server error schema: type: string + security: + - Authorization: [] summary: Cancel Upload tags: - Upload @@ -647,6 +649,10 @@ paths: description: Directory creation not allowed schema: type: string + "413": + description: File too large + schema: + type: string "500": description: Internal server error schema: