From 41ea59d77c85b1a3f12508156e814878ae53dcba Mon Sep 17 00:00:00 2001 From: Tosuke Date: Thu, 5 Jan 2017 19:01:37 +0900 Subject: [PATCH] [Swagger]Add /auth/session/show --- src/api/endpoints/auth/session/show.js | 40 ++++++++++++++++++++++++++ swagger.js | 3 +- 2 files changed, 41 insertions(+), 2 deletions(-) diff --git a/src/api/endpoints/auth/session/show.js b/src/api/endpoints/auth/session/show.js index 67160c6993..b64e36a5e9 100644 --- a/src/api/endpoints/auth/session/show.js +++ b/src/api/endpoints/auth/session/show.js @@ -6,6 +6,46 @@ import AuthSess from '../../../models/auth-session'; import serialize from '../../../serializers/auth-session'; +/** + * @swagger + * /auth/session/show: + * post: + * summary: Show a session information + * parameters: + * - + * name: token + * description: API Token + * in: formData + * required: true + * type: string + * + * responses: + * 200: + * description: OK + * schema: + * type: object + * properties: + * created_at: + * type: string + * format: date + * description: de + * app_id: + * type: string + * description: Application ID + * token: + * type: string + * description: API Token + * user_id: + * type: string + * description: de + * app: + * $ref: "#/definitions/Application" + * 400: + * description: Failed + * schema: + * $ref: "#/definitions/Error" + */ + /** * Show a session * diff --git a/swagger.js b/swagger.js index 9501c4eb3b..defd31b281 100644 --- a/swagger.js +++ b/swagger.js @@ -8,6 +8,7 @@ const apiRoot = './src/api/endpoints'; const files = [ 'users.js', 'auth/session/generate.js', + 'auth/session/show.js', 'auth/session/userkey.js', ]; @@ -194,5 +195,3 @@ var swaggerSpec = swaggerJSDoc(options); fs.writeFileSync('api-docs.json', JSON.stringify(swaggerSpec)); -console.log(JSON.stringify(swaggerSpec)); -