[Swagger]Add /auth/session/show
This commit is contained in:
		
							parent
							
								
									923b9448f6
								
							
						
					
					
						commit
						41ea59d77c
					
				
					 2 changed files with 41 additions and 2 deletions
				
			
		|  | @ -6,6 +6,46 @@ | ||||||
| import AuthSess from '../../../models/auth-session'; | import AuthSess from '../../../models/auth-session'; | ||||||
| import serialize from '../../../serializers/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 |  * Show a session | ||||||
|  * |  * | ||||||
|  |  | ||||||
|  | @ -8,6 +8,7 @@ const apiRoot = './src/api/endpoints'; | ||||||
| const files = [ | const files = [ | ||||||
|   'users.js', |   'users.js', | ||||||
|   'auth/session/generate.js', |   'auth/session/generate.js', | ||||||
|  |   'auth/session/show.js', | ||||||
|   'auth/session/userkey.js', |   'auth/session/userkey.js', | ||||||
| ]; | ]; | ||||||
| 
 | 
 | ||||||
|  | @ -194,5 +195,3 @@ var swaggerSpec = swaggerJSDoc(options); | ||||||
| 
 | 
 | ||||||
| fs.writeFileSync('api-docs.json', JSON.stringify(swaggerSpec)); | fs.writeFileSync('api-docs.json', JSON.stringify(swaggerSpec)); | ||||||
| 
 | 
 | ||||||
| console.log(JSON.stringify(swaggerSpec)); |  | ||||||
| 
 |  | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue