API for transforming CSV files to JSON via HTTP requests
API to practice using DDD
Upload a CSV file and return JSON response with data read from CSV.
Method | Path | Parameters |
---|---|---|
GET | /status | none |
POST | /csv2json/parser | [ [name:csv, value:file] ] |
- Clone this project
- Run tests
- go to project directory
-
php bin/phpunit # unit test vendor/bin/behat # acceptance test
- Init development server
-
symfony server:ca:install symfony server:start
-
- Or install web server for production environment.
In the /postman directory you can find the collection containing the API request with its respective tests. To pass the tests, use the file test.csv in the postman directory.
- PHP 8.1
- Symfony 6.1
Commnad for generate html coverage:
XDEBUG_MODE=coverage php bin/phpunit --coverage-html coverage