- Provide OpenAPI
- Github CI/CD
- Makefile
- Autowiring for factory
- Codecoverage
- Postman schema
- Clean readme.md
Environment is build on Symfony Docker, so for more information you can visit Symfony Docker page.
- If not already done, install Docker Compose (v2.10+)
- Run
docker compose build --pull --no-cache
to build fresh images - Run
docker compose up
(the logs will be displayed in the current shell) - Open
https://localhost
in your favorite web browser and accept the auto-generated TLS certificate - Run
docker compose down --remove-orphans
to stop the Docker containers. - Mock provider API can be accessed by url1: http://localhost:8091/products and http://localhost:8092/get_products
Review system which covers:
- Get preferred (by ID) product data from the preferred (provider/marketplace ID) provider
- Designed RESTful endpoint (endpoints) to get product data from two different providers (provider_a, provider_b)
- The product ID is the same on all providers
- Provider IDs are provider_a, provider_b
- Designed Product Fetcher endpoint(s) always returns the same resource
- Now the full implementation is done in App\Controller\ProductController::productData()
Product Fetcher diagram
Here is request example to get preferred product data from preferred provider:
curl --location --request GET 'localhost/products/<id>?filter[marketplace]=<provider>' \'
For <provider>
- provider_b
or provider_a
can be used.
API has 3 items with ids: [1, 2, 3].