From 66d6f4420edde0284f5c4012596a080e1f5ca3d7 Mon Sep 17 00:00:00 2001 From: Tosuke Date: Fri, 6 Jan 2017 17:45:04 +0900 Subject: [PATCH] [Swagger]Add /app/name_id/available --- src/api/endpoints/app/name_id/available.js | 29 ++++++++++++++++++++++ swagger.js | 1 + 2 files changed, 30 insertions(+) diff --git a/src/api/endpoints/app/name_id/available.js b/src/api/endpoints/app/name_id/available.js index 179925dce4..e101e0637f 100644 --- a/src/api/endpoints/app/name_id/available.js +++ b/src/api/endpoints/app/name_id/available.js @@ -5,6 +5,35 @@ */ import App from '../../../models/app'; +/** + * @swagger + * /app/name_id/available: + * post: + * summary: Check available name_id on creation an application + * parameters: + * - + * name: name_id + * description: Application unique name + * in: formData + * required: true + * type: string + * + * responses: + * 200: + * description: Success + * schema: + * type: object + * properties: + * available: + * description: Whether name_id is available + * type: boolean + * + * default: + * description: Failed + * schema: + * $ref: "#/definitions/Error" + */ + /** * Check available name_id of app * diff --git a/swagger.js b/swagger.js index a4122350fe..9391e80c5a 100644 --- a/swagger.js +++ b/swagger.js @@ -9,6 +9,7 @@ const files = [ 'users.js', //app 'app/show.js', + 'app/name_id/available.js', //auth 'auth/accept.js', //auth/session