1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

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
This commit is contained in:
Lunny Xiao
2018-11-21 01:31:30 +08:00
committed by techknowlogick
parent 499bff43d9
commit 8ef177f8c5
4 changed files with 137 additions and 0 deletions

View File

@@ -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": [