From 8ef177f8c5d0968e732daf6b62fe77d3c2555527 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Wed, 21 Nov 2018 01:31:30 +0800 Subject: 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 --- templates/swagger/v1_json.tmpl | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'templates/swagger/v1_json.tmpl') 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": [ -- cgit v1.2.3