This micro-service is powered by Flask with connexion which auto handles all HTTP request mapping
For details refer to swagger.yaml
- Refactored code structure to follow best practices including the use of
facade
, andDTO
mapper, to improve code readability and maintainability. - Previous Violations to Swagger contract have all been resolved.
- Enabled
response validation
in Flask App to ensure developer maintain the integrity of swagger - TODO items: refer to TODO section
Install
pip
Make sure to have python3
that's it
A script is provided to help with dev setup and running
From project root directory, run
./scripts/init_venv.sh
will create a virtual env and install all dependenciesAfter virtual env is set up, run
./scripts/run_server.sh
will boot up the server on localhost:8822
Use swagger file to examine Endpoint structure click here for swagger editor
Note: To try it out in Dev environment using swagger editor, update the
host
tohost: sensor.vibraneur.com
andschemes
toHTTPS
. To try it out in Local environemnt using editor, udpate thehost
to yourloopback address
andschemes
toHTTP
, NOTHTTPS
. Dev envirinment will NOT redirect HTTP call to HTTPS. It is developer's repsponsibility to ensure usage of HTTPS calls
Bootstrap Flask (in progress) (Done)Database provision (done)Team meeting- Unit Test (Long overdue)...
Copy and paste swagger file to online editor to view API structure here
install
swagger-cli
usingnpm
: runnpm i -g swagger-cli
validate file by runningswagger-cli validate ./swagger/swagger.yaml
Online editor also provides validation here
Database implemented in no-sql in dynomoDB or mongoDB
- Will probably have to listen to kafka pipeline
- Heartbeat to indicate sensor is healthy
- Sensors and bearings in the same database
- Ability to query a list of installed sensors
- Ability to query the status of each sensor
- Ability to query information about a sensor
- Query the total number of sensors
- Ability to add a new sensor
- Ability to remove a sensor
- Ability to check the health of a sensor