aboutsummaryrefslogtreecommitdiffstats
path: root/templates/swagger/v1_json.tmpl
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2018-11-21 01:31:30 +0800
committertechknowlogick <hello@techknowlogick.com>2018-11-20 12:31:30 -0500
commit8ef177f8c5d0968e732daf6b62fe77d3c2555527 (patch)
tree65d29b34c4d2612979e8fb66b0e613997f2a133e /templates/swagger/v1_json.tmpl
parent499bff43d935f1334a76b86fe3a44a5a670479ef (diff)
downloadgitea-8ef177f8c5d0968e732daf6b62fe77d3c2555527.tar.gz
gitea-8ef177f8c5d0968e732daf6b62fe77d3c2555527.zip
add api for user to create org (#5268)
* add api for user to create org * remove unused blank line on the swagger file end * fix create and add test * fix tests * fix routes of create org API * fix bug * add copyright heads
Diffstat (limited to 'templates/swagger/v1_json.tmpl')
-rw-r--r--templates/swagger/v1_json.tmpl36
1 files changed, 36 insertions, 0 deletions
diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl
index 5c8c666041..dada2c98e3 100644
--- a/templates/swagger/v1_json.tmpl
+++ b/templates/swagger/v1_json.tmpl
@@ -406,6 +406,42 @@
}
}
},
+ "/orgs": {
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "organization"
+ ],
+ "summary": "Create an organization",
+ "operationId": "orgCreate",
+ "parameters": [
+ {
+ "name": "organization",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/CreateOrgOption"
+ }
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/Organization"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
"/orgs/{org}": {
"get": {
"produces": [