swagger:GWM
This commit is contained in:
parent
c35d3adfad
commit
dc4c343ecd
@ -7,39 +7,163 @@ module.exports = app => {
|
||||
var router = require("express").Router();
|
||||
|
||||
|
||||
/**
|
||||
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/FinantialsSummary:
|
||||
* get:
|
||||
* summary: Financials Summary
|
||||
* description: Get Financials Summary data by sending entityid
|
||||
* parameters:
|
||||
* - in: query
|
||||
* name: entityid
|
||||
* schema:
|
||||
* type: integer
|
||||
* required: true
|
||||
* description: id of the Entity
|
||||
* example: 7
|
||||
* responses:
|
||||
* 200:
|
||||
* description: success
|
||||
*/
|
||||
// get financials summary
|
||||
router.get("/FinantialsSummary", financials.FinantialsSummary);
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/MenuList:
|
||||
* get:
|
||||
* summary: Menu List
|
||||
* description: Get Menu List data by sending losid
|
||||
* parameters:
|
||||
* - in: query
|
||||
* name: losid
|
||||
* schema:
|
||||
* type: string
|
||||
* required: true
|
||||
* description: Los id of entity
|
||||
* example: MW112233
|
||||
* responses:
|
||||
* 200:
|
||||
* description: success
|
||||
*/
|
||||
// get menu list
|
||||
router.get("/MenuList", financials.MenuList);
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/BrokenPeriodsList:
|
||||
* get:
|
||||
* summary: Broken Periods
|
||||
* description: Get Broken Period data by sending entityid
|
||||
* parameters:
|
||||
* - in: query
|
||||
* name: entityid
|
||||
* schema:
|
||||
* type: integer
|
||||
* required: true
|
||||
* description: id of the Entity
|
||||
* example: 7
|
||||
* responses:
|
||||
* 200:
|
||||
* description: success
|
||||
*/
|
||||
// Retrieve all Broken periods
|
||||
router.get("/BrokenPeriodsList", financials.BrokenPeriodsList);
|
||||
|
||||
/**
|
||||
* @openapi
|
||||
* /api/EntitiesList:
|
||||
* /api/MasterDatas:
|
||||
* get:
|
||||
* description: Welcome to swagger-jsdoc!
|
||||
* description: This is List of all master data for new item master insert (dropdown)
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Returns a mysterious string.
|
||||
*/
|
||||
// insert or update broken periods
|
||||
router.post("/BrokenPeriods", financials.BrokenPeriods);
|
||||
|
||||
// get financials summary
|
||||
router.get("/FinantialsSummary", financials.FinantialsSummary);
|
||||
|
||||
// get menu list
|
||||
router.get("/MenuList", financials.MenuList);
|
||||
|
||||
// Retrieve all Broken periods
|
||||
router.get("/BrokenPeriodsList", financials.BrokenPeriodsList);
|
||||
|
||||
// fetching all master data
|
||||
router.get("/MasterDatas", financials.MasterDatas);
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* definitions:
|
||||
* BrokenPeriod:
|
||||
* type: object
|
||||
* properties:
|
||||
* id:
|
||||
* type: integer
|
||||
* description: primary id of the broken period
|
||||
* example: 1
|
||||
* entity_id:
|
||||
* type: integer
|
||||
* description: primary id of entity
|
||||
* example: 1
|
||||
* from:
|
||||
* type: date
|
||||
* description: selected date
|
||||
* example: '2020-01-01'
|
||||
* to:
|
||||
* type: date
|
||||
* description: selected date
|
||||
* example: '2020-01-01'
|
||||
* months:
|
||||
* type: integer
|
||||
* description: month count between from and to date
|
||||
* example: 3
|
||||
* cy:
|
||||
* type: integer
|
||||
* description: current year
|
||||
* example: 1
|
||||
* py:
|
||||
* type: integer
|
||||
* description: previous year
|
||||
* example: 1
|
||||
* variation:
|
||||
* type: string
|
||||
* description: calculated value
|
||||
* example: '3%'
|
||||
* createdby:
|
||||
* type: integer
|
||||
* description: The person who created
|
||||
* example: 1
|
||||
* updatedby:
|
||||
* type: integer
|
||||
* description: The person who modified
|
||||
* example: 1
|
||||
*/
|
||||
/**
|
||||
* @swagger
|
||||
* /api/BrokenPeriods:
|
||||
* post:
|
||||
* summary: create or update Broken Periods
|
||||
* description: create or update BrokenPeriods value with this single api by altering json object . If key 'id' exist in json object it will update the record otherwise it will create the record .
|
||||
* requestBody:
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* $ref: '#/definitions/BrokenPeriod'
|
||||
* responses:
|
||||
* 200:
|
||||
* description: BrokenPeriods created or updated succesfully
|
||||
* 500:
|
||||
* description: failure in creating statement
|
||||
*/
|
||||
// create broken periods
|
||||
router.post("/BrokenPeriods", financials.BrokenPeriods);
|
||||
// create financials data
|
||||
router.post("/createFinancials", financials.createFinancials);
|
||||
|
||||
// update financials data
|
||||
router.post("/updateFinancials", financials.updateFinancials);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* definitions:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user