diff options
author | stevegt <stevegt@t7a.org> | 2018-05-31 22:51:49 -0700 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2018-06-01 13:51:49 +0800 |
commit | 39f2aa7c12004d5536810e7178d2c5de806855de (patch) | |
tree | d4fac6f80bee2a475573ffbb5270e5effd839545 /routers | |
parent | 7707ad7a0a6cda66036bd0eec2dead95d8664326 (diff) | |
download | gitea-39f2aa7c12004d5536810e7178d2c5de806855de.tar.gz gitea-39f2aa7c12004d5536810e7178d2c5de806855de.zip |
add simple descriptions for file API responses (#4089)
* Partial fix for #4010
Swagger needs a description field in each swagger:operation response. Adding
minimal text for now on the way to getting swagger validate to pass. Many
standard swagger client libraries will not work with gitea until validate
passes, so prioritizing that over better descriptions for now.
Signed-off-by: Steve Traugott <stevegt@t7a.org>
Diffstat (limited to 'routers')
-rw-r--r-- | routers/api/v1/repo/file.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/routers/api/v1/repo/file.go b/routers/api/v1/repo/file.go index 306b65a328..a3c8309ac5 100644 --- a/routers/api/v1/repo/file.go +++ b/routers/api/v1/repo/file.go @@ -36,7 +36,8 @@ func GetRawFile(ctx *context.APIContext) { // type: string // required: true // responses: - // 200: + // 200: + // description: success if !ctx.Repo.HasAccess() { ctx.Status(404) return @@ -85,7 +86,8 @@ func GetArchive(ctx *context.APIContext) { // type: string // required: true // responses: - // 200: + // 200: + // description: success repoPath := models.RepoPath(ctx.Params(":username"), ctx.Params(":reponame")) gitRepo, err := git.OpenRepository(repoPath) if err != nil { @@ -121,7 +123,8 @@ func GetEditorconfig(ctx *context.APIContext) { // type: string // required: true // responses: - // 200: + // 200: + // description: success ec, err := ctx.Repo.GetEditorconfig() if err != nil { if git.IsErrNotExist(err) { |