-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Swagger.v1.json template #3572
Swagger.v1.json template #3572
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
public/ | ||
templates/swagger/v1_json.tmpl | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The file should not be ignored as CI check that the file is valid with the generation (re-generate and check if git detect changes) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It has been ignored all the time. This file was moved from There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh sorry, I didn't see that it wasn't top-level ... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No problem. |
||
themes/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package routers | ||
|
||
import ( | ||
"code.gitea.io/gitea/modules/base" | ||
"code.gitea.io/gitea/modules/context" | ||
) | ||
|
||
// tplSwaggerV1Json swagger v1 json template | ||
const tplSwaggerV1Json base.TplName = "swagger/v1_json" | ||
|
||
// SwaggerV1Json render swagger v1 json | ||
func SwaggerV1Json(ctx *context.Context) { | ||
ctx.HTML(200, tplSwaggerV1Json) | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ | |
}, | ||
"version": "1.1.1" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you also fill the version with the corresponding var ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, but I think it should be done in another PR, if at all. |
||
}, | ||
"basePath": "/api/v1", | ||
"basePath": "{{AppSubUrl}}/api/v1", | ||
"paths": { | ||
"/admin/users": { | ||
"post": { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not against this change but it will need to be indicated as breaking. So we need to add the label kind/breaking on PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup.