Skip to content
Snippets Groups Projects
Commit 0a956be8 authored by Renzo Beux's avatar Renzo Beux
Browse files

Merge branch 'feature/ExcelParser' into develop

parents 222eb4f0 af7970d4
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,7 @@ import {
} from 'express';
import { SheetParserResponse } from '../Models/SheetParserResponse';
import SheetService from '../Services/SheetService';
// import SwaggerSchemas from './Controllers/SwaggerSchemas';
const router = Router();
const parseSheet: Handler = async (req: Request, res: Response) => {
......@@ -17,36 +17,6 @@ const parseSheet: Handler = async (req: Request, res: Response) => {
}
};
/**
* @swagger
* /excelParser:
* post:
* tags:
* - parser
* description: Sheet Parser
* requestBody:
* required: true
* content:
* application/json:
* schema:
* type: object
* required:
* - email
* - password
* properties:
* excel:
* type: string
* responses:
* '200':
* description: returns the parsed JSON of the excel file provided
* content:
* application/json:
* schema:
* type: object
* properties:
* excelParsed:
* type: string
*/
router.post('/', parseSheet);
export default router;
# /**
# * @swagger
# * components:
# * schemas:
# * Menores:
# * type: object
# * properties:
# * edad:
# * type: integer
# * peso:
# * type: integer
# * Mayores:
# * type: object
# * properties:
# * edad:
# * type: integer
# * peso:
# * type: integer
# * talla:
# * type: integer
# * SheetParserResponse:
# * type: object
# * properties:
# * hombresMenores:
# * type: Menores []
# *
# *
# * mujeresMenores:
# * type: Menores []
# * hombres:
# * type: Mayores []
# * mujeres:
# * type: Mayores []
# */
/**
* @swagger
* /excelParser:
* post:
* tags:
* - parser
* description: Sheet Parser
* requestBody:
* required: true
* content:
* application/octet-stream:
* type: binary
* responses:
* '200':
* description: returns the parsed JSON of the excel file provided
* content:
* application/json:
* schema:
* $ref: '#/components/schemas/SheetParserResponse'
*/
\ No newline at end of file
/**
* @swagger
* components:
* schemas:
* Menores:
* type: object
* properties:
* edad:
* type: integer
* peso:
* type: integer
* Mayores:
* type: object
* required: ["edad"]
* properties:
* edad:
* type: integer
* peso:
* type: integer
* talla:
* type: integer
* SheetParserResponse:
* type: object
* properties:
* hombresMenores:
* type: array
* items:
* $ref: '#/components/schemas/Menores'
* mujeresMenores:
* type: array
* items:
* $ref: '#/components/schemas/Menores'
* hombres:
* type: array
* items:
* $ref: '#/components/schemas/Mayores'
* mujeres:
* type: array
* items:
* $ref: '#/components/schemas/Mayores'
*/
\ No newline at end of file
......@@ -21,7 +21,7 @@ const swaggerOptions: Options = {
servers: ['http://localhost:3000'],
},
},
apis: ['src/routes.ts'],
apis: ['src/Controllers/*'],
};
const swaggerDocs = swaggerJsDoc(swaggerOptions);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment