summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2020-01-09 17:40:01 +0100
committerzeripath <art27@cantab.net>2020-01-09 16:40:01 +0000
commite8ea0695b01c1439586a4e62fcfdfb0835f5b835 (patch)
tree7b89dfa8305f148c6b885c948174716ba1df7bb2 /templates
parent07520431aec1cbe115e5d85b038f6a9f1e0e7296 (diff)
downloadgitea-e8ea0695b01c1439586a4e62fcfdfb0835f5b835.tar.gz
gitea-e8ea0695b01c1439586a4e62fcfdfb0835f5b835.zip
[API] creat org repo call same as github (#9186)
* deprecate /api/v1/org/{org}/repos in favour of /api/v1/orgs/{org}/repos + cleanup api repository routes a bit * remove redundant code * use upstream function for api cal * make generate-swagger Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv>
Diffstat (limited to 'templates')
-rw-r--r--templates/swagger/v1_json.tmpl44
1 files changed, 43 insertions, 1 deletions
diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl
index 79f760b7ab..6bad462196 100644
--- a/templates/swagger/v1_json.tmpl
+++ b/templates/swagger/v1_json.tmpl
@@ -574,7 +574,8 @@
"organization"
],
"summary": "Create a repository in an organization",
- "operationId": "createOrgRepo",
+ "operationId": "createOrgRepoDeprecated",
+ "deprecated": true,
"parameters": [
{
"type": "string",
@@ -1140,6 +1141,47 @@
"$ref": "#/responses/RepositoryList"
}
}
+ },
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "organization"
+ ],
+ "summary": "Create a repository in an organization",
+ "operationId": "createOrgRepo",
+ "deprecated": true,
+ "parameters": [
+ {
+ "type": "string",
+ "description": "name of organization",
+ "name": "org",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/CreateRepoOption"
+ }
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/Repository"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
}
},
"/orgs/{org}/teams": {