summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorShashvat Kedia <sk261@snu.edu.in>2019-01-24 04:00:19 +0530
committertechknowlogick <matti@mdranta.net>2019-01-23 17:30:19 -0500
commit1b90692844c1b714d9c03cf7c96e7f62923236c0 (patch)
treecb9bb22743da0898bb39c718bb3537a9581e8ea5 /templates
parentb9f87376a2de9dd56fb6c374fc786b6aebd1e911 (diff)
downloadgitea-1b90692844c1b714d9c03cf7c96e7f62923236c0.tar.gz
gitea-1b90692844c1b714d9c03cf7c96e7f62923236c0.zip
New API routes added (#5594)
* New API routes added * Comments added * Build fix * swagger_v1_json.tmpl without new line character * Typo fix * Code review changes * Code review changes * Add copyright * Add copyright * Add copyright * Update per @lafriks feedback * Update org.go * Update user.go * Update user.go * make fmt
Diffstat (limited to 'templates')
-rw-r--r--templates/swagger/v1_json.tmpl38
1 files changed, 38 insertions, 0 deletions
diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl
index 153701d6dd..d86d1116ca 100644
--- a/templates/swagger/v1_json.tmpl
+++ b/templates/swagger/v1_json.tmpl
@@ -23,7 +23,45 @@
},
"basePath": "{{AppSubUrl}}/api/v1",
"paths": {
+ "/admin/orgs": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "admin"
+ ],
+ "summary": "List all organizations",
+ "operationId": "adminGetAllOrgs",
+ "responses": {
+ "200": {
+ "$ref": "#/responses/OrganizationList"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ }
+ }
+ }
+ },
"/admin/users": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "admin"
+ ],
+ "summary": "List all users",
+ "operationId": "adminGetAllUsers",
+ "responses": {
+ "200": {
+ "$ref": "#/responses/UserList"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ }
+ }
+ },
"post": {
"consumes": [
"application/json"