summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/swagger
diff options
context:
space:
mode:
authorRichard Mahn <richmahn@users.noreply.github.com>2019-04-17 10:06:35 -0600
committertechknowlogick <matti@mdranta.net>2019-04-17 12:06:35 -0400
commit2262811e407facea09047e94aa1850c192511587 (patch)
treea478624613dc6cf095784d629f9627b197de15e8 /routers/api/v1/swagger
parent059195b127848d96a4690257af19d8c97c6d2363 (diff)
downloadgitea-2262811e407facea09047e94aa1850c192511587.tar.gz
gitea-2262811e407facea09047e94aa1850c192511587.zip
Fixes 4762 - Content API for Creating, Updating, Deleting Files (#6314)
Diffstat (limited to 'routers/api/v1/swagger')
-rw-r--r--routers/api/v1/swagger/options.go10
-rw-r--r--routers/api/v1/swagger/repo.go28
2 files changed, 38 insertions, 0 deletions
diff --git a/routers/api/v1/swagger/options.go b/routers/api/v1/swagger/options.go
index 038f79005f..83f7cfec8d 100644
--- a/routers/api/v1/swagger/options.go
+++ b/routers/api/v1/swagger/options.go
@@ -97,6 +97,7 @@ type swaggerParameterBodies struct {
// in:body
CreateUserOption api.CreateUserOption
+
// in:body
EditUserOption api.EditUserOption
@@ -105,4 +106,13 @@ type swaggerParameterBodies struct {
// in:body
EditAttachmentOptions api.EditAttachmentOptions
+
+ // in:body
+ CreateFileOptions api.CreateFileOptions
+
+ // in:body
+ UpdateFileOptions api.UpdateFileOptions
+
+ // in:body
+ DeleteFileOptions api.DeleteFileOptions
}
diff --git a/routers/api/v1/swagger/repo.go b/routers/api/v1/swagger/repo.go
index f671037795..a23e670dac 100644
--- a/routers/api/v1/swagger/repo.go
+++ b/routers/api/v1/swagger/repo.go
@@ -162,9 +162,37 @@ type swaggerGitTreeResponse struct {
Body api.GitTreeResponse `json:"body"`
}
+// GitBlobResponse
+// swagger:response GitBlobResponse
+type swaggerGitBlobResponse struct {
+ //in: body
+ Body api.GitBlobResponse `json:"body"`
+}
+
// Commit
// swagger:response Commit
type swaggerCommit struct {
//in: body
Body api.Commit `json:"body"`
}
+
+// FileResponse
+// swagger:response FileResponse
+type swaggerFileResponse struct {
+ //in: body
+ Body api.FileResponse `json:"body"`
+}
+
+// FileContentResponse
+// swagger:response FileContentResponse
+type swaggerFileContentResponse struct {
+ //in: body
+ Body api.FileContentResponse `json:"body"`
+}
+
+// FileDeleteResponse
+// swagger:response FileDeleteResponse
+type swaggerFileDeleteResponse struct {
+ //in: body
+ Body api.FileDeleteResponse `json:"body"`
+}