File tree 3 files changed +72
-0
lines changed
3 files changed +72
-0
lines changed Original file line number Diff line number Diff line change 2
2
// Use of this source code is governed by a MIT-style
3
3
// license that can be found in the LICENSE file.
4
4
5
+ //go:generate swagger generate spec
6
+
7
+ // Package v1 Gitea API.
8
+ //
9
+ // This provide API interface to communicate with this Gitea instance.
10
+ //
11
+ // Terms Of Service:
12
+ //
13
+ // there are no TOS at this moment, use at your own risk we take no responsibility
14
+ //
15
+ // Schemes: http, https
16
+ // BasePath: /api/v1
17
+ // Version: 1.1.1
18
+ // License: MIT http://opensource.org/licenses/MIT
19
+ //
20
+ // Consumes:
21
+ // - application/json
22
+ //
23
+ // Produces:
24
+ // - application/json
25
+ //
26
+ //
27
+ // swagger:meta
5
28
package v1
6
29
7
30
import (
Original file line number Diff line number Diff line change @@ -15,6 +15,24 @@ import (
15
15
// Markdown render markdown document to HTML
16
16
// see https://github.com/gogits/go-gogs-client/wiki/Miscellaneous#render-an-arbitrary-markdown-document
17
17
func Markdown (ctx * context.APIContext , form api.MarkdownOption ) {
18
+ // swagger:route GET /markdown renderMarkdown
19
+ //
20
+ // TODO title
21
+ //
22
+ // TODO desc
23
+ //
24
+ // Consumes:
25
+ // - application/json
26
+ //
27
+ // Produces:
28
+ // - text/html
29
+ //
30
+ // Schemes: http, https
31
+ //
32
+ // Responses:
33
+ // 200: markdownRender
34
+ // 422: validationError
35
+
18
36
if ctx .HasAPIError () {
19
37
ctx .Error (422 , "" , ctx .GetErrMsg ())
20
38
return
@@ -42,6 +60,23 @@ func Markdown(ctx *context.APIContext, form api.MarkdownOption) {
42
60
// MarkdownRaw render raw markdown HTML
43
61
// see https://github.com/gogits/go-gogs-client/wiki/Miscellaneous#render-a-markdown-document-in-raw-mode
44
62
func MarkdownRaw (ctx * context.APIContext ) {
63
+ // swagger:route GET /markdown/raw renderMarkdownRaw
64
+ //
65
+ // TODO title
66
+ //
67
+ // TODO desc
68
+ //
69
+ // Consumes:
70
+ // - text/plain
71
+ //
72
+ // Produces:
73
+ // - text/html
74
+ //
75
+ // Schemes: http, https
76
+ //
77
+ // Responses:
78
+ // 200: markdownRawRender
79
+ // 422: validationError
45
80
body , err := ctx .Req .Body ().Bytes ()
46
81
if err != nil {
47
82
ctx .Error (422 , "" , err )
Original file line number Diff line number Diff line change @@ -12,5 +12,19 @@ import (
12
12
13
13
// Version shows the version of the Gitea server
14
14
func Version (ctx * context.APIContext ) {
15
+
16
+ // swagger:route GET /version getVersion
17
+ //
18
+ // Return Gitea running version.
19
+ //
20
+ // This show current running Gitea application version.
21
+ //
22
+ // Produces:
23
+ // - application/json
24
+ //
25
+ // Schemes: http, https
26
+ //
27
+ // Responses:
28
+ // 200: serverVersion
15
29
ctx .JSON (200 , & gitea.ServerVersion {Version : setting .AppVer })
16
30
}
You can’t perform that action at this time.
0 commit comments