mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Add API for gitignore templates (#22783)
This implements the [Gitignores template API of GitHub](https://docs.github.com/en/rest/gitignore?apiVersion=2022-11-28) in Gitea
This commit is contained in:
76
templates/swagger/v1_json.tmpl
generated
76
templates/swagger/v1_json.tmpl
generated
@@ -883,6 +883,52 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/gitignore/templates": {
|
||||
"get": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"miscellaneous"
|
||||
],
|
||||
"summary": "Returns a list of all gitignore templates",
|
||||
"operationId": "listGitignoresTemplates",
|
||||
"responses": {
|
||||
"200": {
|
||||
"$ref": "#/responses/GitignoreTemplateList"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/gitignore/templates/{name}": {
|
||||
"get": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"miscellaneous"
|
||||
],
|
||||
"summary": "Returns information about a gitignore template",
|
||||
"operationId": "getGitignoreTemplateInfo",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "name of the template",
|
||||
"name": "name",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"$ref": "#/responses/GitignoreTemplateInfo"
|
||||
},
|
||||
"404": {
|
||||
"$ref": "#/responses/notFound"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/licenses": {
|
||||
"get": {
|
||||
"produces": [
|
||||
@@ -18342,6 +18388,21 @@
|
||||
},
|
||||
"x-go-package": "code.gitea.io/gitea/modules/structs"
|
||||
},
|
||||
"GitignoreTemplateInfo": {
|
||||
"description": "GitignoreTemplateInfo name and text of a gitignore template",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"x-go-name": "Name"
|
||||
},
|
||||
"source": {
|
||||
"type": "string",
|
||||
"x-go-name": "Source"
|
||||
}
|
||||
},
|
||||
"x-go-package": "code.gitea.io/gitea/modules/structs"
|
||||
},
|
||||
"Hook": {
|
||||
"description": "Hook a hook is a web hook when one repository changed",
|
||||
"type": "object",
|
||||
@@ -21614,6 +21675,21 @@
|
||||
"$ref": "#/definitions/GitTreeResponse"
|
||||
}
|
||||
},
|
||||
"GitignoreTemplateInfo": {
|
||||
"description": "GitignoreTemplateInfo",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/GitignoreTemplateInfo"
|
||||
}
|
||||
},
|
||||
"GitignoreTemplateList": {
|
||||
"description": "GitignoreTemplateList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Hook": {
|
||||
"description": "Hook",
|
||||
"schema": {
|
||||
|
Reference in New Issue
Block a user