Browse Source

Test Example Body

Leonard Schulz (Arbeit) 2 years ago
parent
commit
162ede838e
1 changed files with 10 additions and 17 deletions
  1. 10 17
      backend_nodejs/wbs_rechner_express.js

+ 10 - 17
backend_nodejs/wbs_rechner_express.js

@@ -49,23 +49,6 @@ app.use('/api', swaggerUi.serve, swaggerUi.setup(specs));
  *                             type: number
  *                           advertisingCosts:
  *                             type: number
- *     responses:
- *       200:
- *         description: Success
- *         content:
- *           application/json:
- *             schema:
- *               type: object
- *               properties:
- *                 wbsGranted:
- *                   type: boolean
- *     requestBody:
- *       description: Example request body
- *       required: true
- *       content:
- *         application/json:
- *           schema:
- *             type: object
  *             example:
  *               persons:
  *                 - incomes:
@@ -82,6 +65,16 @@ app.use('/api', swaggerUi.serve, swaggerUi.setup(specs));
  *                     - amount: 2000
  *                       frequency: 1
  *                       advertisingCosts: 0
+ *     responses:
+ *       200:
+ *         description: Success
+ *         content:
+ *           application/json:
+ *             schema:
+ *               type: object
+ *               properties:
+ *                 wbsGranted:
+ *                   type: boolean
  */
 app.post('/calculate', (req, res) => {
     let totalIncome = 0;