aboutsummaryrefslogtreecommitdiffstats
path: root/templates/swagger
diff options
context:
space:
mode:
authorJohn Olheiser <john.olheiser@gmail.com>2020-09-11 09:48:39 -0500
committerGitHub <noreply@github.com>2020-09-11 10:48:39 -0400
commit26c4a049da178993e5ccddcb50e7edc70a6bde5d (patch)
tree494106117720ff3ad5f9e77a380c9397c3cfe10b /templates/swagger
parentdd1a651b5895cfdb8a141a56aa824ed4d082c41a (diff)
downloadgitea-26c4a049da178993e5ccddcb50e7edc70a6bde5d.tar.gz
gitea-26c4a049da178993e5ccddcb50e7edc70a6bde5d.zip
Issue templates directory (#11450)
* Issue templates Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add some comments, appease the linter Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add docs and re-use dir candidates Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add default labels to issue templates Signed-off-by: jolheiser <john.olheiser@gmail.com> * Generate swagger Signed-off-by: jolheiser <john.olheiser@gmail.com> * Suggested changes Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update issue.go * Suggestions Signed-off-by: jolheiser <john.olheiser@gmail.com> * Extract metadata from legacy if possible Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'templates/swagger')
-rw-r--r--templates/swagger/v1_json.tmpl76
1 files changed, 76 insertions, 0 deletions
diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl
index ac65b3ce17..a5840f2bab 100644
--- a/templates/swagger/v1_json.tmpl
+++ b/templates/swagger/v1_json.tmpl
@@ -3852,6 +3852,39 @@
}
}
},
+ "/repos/{owner}/{repo}/issue_templates": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get available issue templates for a repository",
+ "operationId": "repoGetIssueTemplates",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "owner of the repo",
+ "name": "owner",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repo",
+ "name": "repo",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/IssueTemplates"
+ }
+ }
+ }
+ },
"/repos/{owner}/{repo}/issues": {
"get": {
"produces": [
@@ -13439,6 +13472,40 @@
},
"x-go-package": "code.gitea.io/gitea/modules/structs"
},
+ "IssueTemplate": {
+ "description": "IssueTemplate represents an issue template for a repository",
+ "type": "object",
+ "properties": {
+ "about": {
+ "type": "string",
+ "x-go-name": "About"
+ },
+ "content": {
+ "type": "string",
+ "x-go-name": "Content"
+ },
+ "file_name": {
+ "type": "string",
+ "x-go-name": "FileName"
+ },
+ "labels": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "x-go-name": "Labels"
+ },
+ "name": {
+ "type": "string",
+ "x-go-name": "Name"
+ },
+ "title": {
+ "type": "string",
+ "x-go-name": "Title"
+ }
+ },
+ "x-go-package": "code.gitea.io/gitea/modules/structs"
+ },
"Label": {
"description": "Label a label to an issue or a pr",
"type": "object",
@@ -15480,6 +15547,15 @@
}
}
},
+ "IssueTemplates": {
+ "description": "IssueTemplates",
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/IssueTemplate"
+ }
+ }
+ },
"Label": {
"description": "Label",
"schema": {