This repository has been archived on 2025-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
BreCal/src/server
2024-11-10 15:08:41 +01:00
..
BreCal serverside fixes for detecting unchanged time values 2024-11-10 15:08:41 +01:00
tests Allow new shipcalls up to 1 day in the past for serverside validation 2024-11-07 09:26:23 +01:00
flaskapp.wsgi fixed site module include path 2024-09-23 08:24:39 +02:00
README.md updated environment 2023-03-12 11:56:24 +01:00
requirements.txt Adding validation rules (traffic light status) to the system. Post & Put calls of shipcalls and times now execute the traffic light evaluation and store the result in the connected MySQL database instance. The 'brecal_utils' library is merged with 'BreCal', including the stub objects and test functions. Requirements were adapted, and installation of a virtual environment works from scratch (on a linux system). 2023-10-17 09:09:35 +02:00
setup.py Created test version including version bump to 1.5.0 2024-08-30 11:27:10 +02:00

BreCal

OpenAPI 3.0 Generated Flask project

The code was originally created by exporting the API from Postman. Selecting the API on the left (root element) the code generation icon becomes visible on the right.

image

If the API gets updated I think it makes most sense to export again into a API helper branch and then merge this branch back into the project. Please do not forget to update the index.yaml file. The branch is named yaml_export.

All the routes are defined in 'project/api' folder. Each route parses the request and calls the corresponding function in the 'project/impl' directory passing all the parameters and request body as function arguments.

To run this project:

pip install -r requirements.txt
export FLASK_APP='BreCal'
export FLASK_ENV=development
flask run