summaryrefslogtreecommitdiff
path: root/src/api/endpoints
diff options
context:
space:
mode:
authorTosuke <tasukeprg@gmail.com>2017-01-06 18:33:03 +0900
committerTosuke <tasukeprg@gmail.com>2017-01-06 18:33:03 +0900
commita5ff6fb285eeb3b6ecce59b846a1f610a89a11c2 (patch)
tree6e8d31a62ff95658e79d5c920cd51391f3877355 /src/api/endpoints
parent[Swagger]Add /app/name_id/available (diff)
downloadsharkey-a5ff6fb285eeb3b6ecce59b846a1f610a89a11c2.tar.gz
sharkey-a5ff6fb285eeb3b6ecce59b846a1f610a89a11c2.tar.bz2
sharkey-a5ff6fb285eeb3b6ecce59b846a1f610a89a11c2.zip
[Swagger]Add /app/create
Diffstat (limited to 'src/api/endpoints')
-rw-r--r--src/api/endpoints/app/create.js53
1 files changed, 53 insertions, 0 deletions
diff --git a/src/api/endpoints/app/create.js b/src/api/endpoints/app/create.js
index d83062c8e9..9ce98b197a 100644
--- a/src/api/endpoints/app/create.js
+++ b/src/api/endpoints/app/create.js
@@ -8,6 +8,59 @@ import App from '../../models/app';
import serialize from '../../serializers/app';
/**
+ * @swagger
+ * /app/create:
+ * post:
+ * summary: Create an application
+ * parameters:
+ * - $ref: "#/parameters/AccessToken"
+ * -
+ * name: name_id
+ * description: Application unique name
+ * in: formData
+ * required: true
+ * type: string
+ * -
+ * name: name
+ * description: Application name
+ * in: formData
+ * required: true
+ * type: string
+ * -
+ * name: description
+ * description: Application description
+ * in: formData
+ * required: true
+ * type: string
+ * -
+ * name: permission
+ * description: Permissions that application has
+ * in: formData
+ * required: true
+ * type: array
+ * items:
+ * type: string
+ * collectionFormat: csv
+ * -
+ * name: callback_url
+ * description: URL called back after authentication
+ * in: formData
+ * required: false
+ * type: string
+ *
+ * responses:
+ * 200:
+ * description: Created application's information
+ * schema:
+ * $ref: "#/definitions/Application"
+ *
+ * default:
+ * description: Failed
+ * schema:
+ * $ref: "#/definitions/Error"
+ */
+
+/**
* Create an app
*
* @param {Object} params