annotations

This commit is contained in:
2024-11-27 12:46:03 +02:00
parent 54b8941f3c
commit ad4eef17f5
12 changed files with 514 additions and 36 deletions
@@ -0,0 +1,60 @@
import express from 'express';
/**
* ScenariosController. API for the scenarios manager
*/
class ScenariosController{
name = 'scenariosApi'
route = '/api/scenario'
/**
* Initializes the ScenariosController plugin
* @param {App} app The application instance
*/
init(app){
const router = express.Router();
const { scenarios } = app;
/**
* API: PUT /api/scenario/ Create or update scenario
* @function createOrUpdate
* @memberof ScenariosController
*/
router.put('/', async (req, res)=>{
});
/**
* API: POST /api/scenario/ List scenarios by given criteria
* @function list
* @returns {Scenario[]}
* @memberof ScenariosController
*/
router.post('/', async (req, res)=>{
})
/**
* API: GET /api/scenario/:id Retrieve scenario by ID
* @function read
* @param {string} id The id of the scenario
* @returns {Scenario}
* @memberof ScenariosController
*/
router.get('/:id', async (req, res)=>{
})
/**
* API: DELETE /api/scenario/:id Delete scenario by ID
* @function remove
* @param {string} id The id of the scenario
* @memberof ScenariosController
*/
router.delete('/:id', async (req, res)=>{
})
app.webServer.xapp.use(this.route, router);
}
}
export { ScenariosController }