Simple RESTFul geoapi guided by OpenAPI yaml definition
git clone https://github.com/luipir/geoapi_test.git
$> cd geoapi_test/python-flask-server
$> docker-compose up
Can be found at: API documented in: https://app.swaggerhub.com/apis/luipir/geo_test/1.0.0#/
requirements: Need libgeos installed due to Shapely.
$> cd geoapi_test/python-flask-server
$> virtualenv -p `which python3` openapi_venv
$> source ./openapi_venv/bin/activate
(openapi_venv) $> pip3 install -r requirements.txt
(openapi_venv) $> pip3 install -r test-requirements.txt
(openapi_venv) $> pip3 install tox
(openapi_venv) $> tox
$> cd geoapi_test/python-client
$> virtualenv -p `which python3` openapi_venv
$> source ./openapi_venv/bin/activate
(openapi_venv) $> pip3 install -r requirements.txt
(openapi_venv) $> pip3 install -r test-requirements.txt
(openapi_venv) $> pip3 install tox
(openapi_venv) $> tox
I decided to create the skeleton of all api and relative empty tests using openapi-generator basing on api specification in a swagger.yml: https://github.com/luipir/geoapi_test/blob/develop/swagger.yaml
Because some limitations of the code generator (or my ignorance) I loosed a lot of time putting it at work.This reduced a lot the time to complete most of the test so I focused mainly in integration test to be sure to have a working server. For lack of time there are not all unittest. Not covered all endpoints unit tests that are covered by integration tests instead.