The project is technical assessment for oat.
- PHP7.2
- Composer
- Docker && Docker composer
-
Clone the repository
-
Execute composer
compoer install
-
Run command
docker-compose up -d
from the root directory of the project. This make take several minutes. -
The api should be accessible on localhost:81
-
(optional) you can setup on your
hosts
file the127.0.0.1 tao.docker
so the api will be also available on this url.
The sources are located under resources
path. For now we have
the json and csv data sources. Default data source is the json file.
To switch sources we only need to update related configuration option found on
config/services.yaml
. See below
...
# by updating the following the parameteres on we can load different data sources from configurable
# root resources path and filename and resource type. For our exanple changing json to csv is enough for loading
# the csv resource.
#the rest of the project remains the same.
parameters:
app.resource_dir: '%env(REOUSRCE_SOURCE)%'
app.resource_file_name: 'testtakers'
app.resource_type: 'json'
...
php bin/phpunit
You can check with the current default configuration tests are passing. If you check the resource type to csv, tests will fail because we are using separate resources root path that that's include the csv file.
- Support SSL
- Better validation on query params
- More efficient filtering, and perhaps adding cache
- Proper logging, (using sentry)