pizza-api is the REST API application for CRUD pizzas and set the prices

  1. Clone this repo.

  2. Composer install

    docker-compose run --rm php-cli composer install

  3. Up the migrations

    docker-compose run --rm php-cli php bin/console doc:mi:mi

  4. Load fixtures [optional]

    docker-compose run --rm php-cli php bin/console doc:fixtures:load

  5. Generate SSL keys

    docker-compose run --rm php-cli php bin/console lexik:jwt:generate-keypair

  6. First up docker

    docker-compose up -d

  7. First send for obtain a token

POST http://localhost:8080/api/login_check

{"username":"admin@admin.admin","password":"admin"}

You will receive something like:

img_4.png

  1. Use this token as Bearer in Headers for requests

img_1.png

  1. Api documents is available here http://localhost:8080/api/doc

img_3.png

  1. Unit tests docker-compose run --rm php-cli php bin/phpunit

img_2.png