This project aims to demontrate a simple Rest Api implementation, Many-To-Many entities relationship, Symfony console command creation and CSV file importing.
Install symfony-api with docker-compose
git clone [email protected]:diegoBSousa/symfony-api.git
cd symfony-api
docker-compose up -d
~$ symfony console app:import-posts ./file-name.csv
GET /api/v1/tags?page=${page}&limit=${limit}
Parameter | Type | Description |
---|---|---|
page |
string |
Optional. Page number |
limit |
string |
Optional. Items per page |
POST /api/v1/tags
Parameter | Type | Description |
---|---|---|
tag |
string |
Required. Tag name |
posts |
integer[] |
Optional. Array of integer with Post Entity ID |
PATCH /api/v1/tags
Parameter | Type | Description |
---|---|---|
tag |
string |
Optional. Tag name |
posts |
integer[] |
Optional. Array of integer with Post Entity ID |
DELETE /api/v1/tags/${tagId}
Parameter | Type | Description |
---|---|---|
tagId |
integer |
Required. Tag ID |
GET /api/v1/posts?page=${page}&limit=${limit}
Parameter | Type | Description |
---|---|---|
page |
string |
Optional. Page number |
limit |
string |
Optional. Items per page |
POST /api/v1/posts
Parameter | Type | Description |
---|---|---|
title |
string |
Required. Post title |
content |
string |
Required. Post HTML Content |
image |
url |
Required. Image url |
tags |
integer[] |
Optional. Array of integer with Tag Entity ID |
PATCH /api/v1/posts
Parameter | Type | Description |
---|---|---|
title |
string |
Optional. Post title |
content |
string |
Optional. Post HTML Content |
image |
url |
Optional. Image url |
tags |
integer[] |
Optional. Array of integer with Tag Entity ID |
DELETE /api/v1/posts/${postId}
Parameter | Type | Description |
---|---|---|
postId |
integer |
Required. Post ID |