API-35: Swagger documentation (!17)
Jenkins Production Deployment

Co-authored-by: Patrick Mueller <patrick@mueller-patrick.tech>
Reviewed-on: #17
Co-authored-by: Patrick Müller <patrick@plutodev.de>
Co-committed-by: Patrick Müller <patrick@plutodev.de>
This commit was merged in pull request #17.
This commit is contained in:
2022-01-09 15:19:49 +00:00
parent af8f77a268
commit ac29860075
6 changed files with 3790 additions and 5182 deletions
@@ -11,6 +11,54 @@ import * as icalgenerator from './icalgenerator/icalgenerator.service';
*/
export const raPlaMiddlewareRouter = express.Router();
/**
* @swagger
* /rapla-middleware:
* get:
* summary: Retrieve the adjusted RaPla .ics file
* description: Downloads the current .ics file from DHBW servers, removes unwanted events and returns the file.
* Required urls can be generated on https://rapla-middleware.p4ddy.com
* tags:
* - rapla-middleware
* responses:
* 200:
* description: The .ics file
* 400:
* description: Wrong parameters, see response body for detailed information
* 500:
* description: A server error occured. Please try again. If this issue persists, contact the admin.
* parameters:
* - in: query
* name: user
* required: true
* description: The user from RaPla, can be taken directly from the RaPla link
* schema:
* type: string
* - in: query
* name: file
* required: true
* description: The file from RaPla, can be taken directly from the RaPla link
* schema:
* type: string
* - in: query
* name: blockers
* required: false
* description: Whether to remove blockers from the .ics file
* schema:
* type: boolean [0,1]
* - in: query
* name: wahl
* required: false
* description: The chosen elective module which is not to be filtered out
* schema:
* type: number
* - in: query
* name: pflicht
* required: false
* description: The chosen profile module which is not to be filtered out
* schema:
* type: number
*/
raPlaMiddlewareRouter.get('/', async (req: Request, res: Response) => {
try {
let user = (req.query.user ?? '').toString();