Maghraby / internation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Internation API.

This's documentation for Internation task using Symfony v4.2

Prerequisites

Make sure that you install PHP v7.1.3, MySQL v5.7 and composer

Development

Clone the source

 git clone https://github.com/Maghraby/internation.git

Installing

 cd internation
 composer install
Create database:
 php bin/console doctrine:database:create
Load database schema:
 php bin/console doctrine:migrations:migrate
Load data fixtures:
 php bin/console doctrine:fixtures:load
Note:

Please don't forget to change database URL from .env file

ER Digram

ER Digram

Domain Model Digram.

ER Digram

Admin Scenario

  • Admin Can list all users via /api/users using GET method.
  • Admin Can create users via /api/users using POST method.
  • Admin Can delete a user via /api/users/{id} using DELETE method.
  • Admin Can list all groups via /api/groups using GET method.
  • Admin Can create groups via /api/groups using POST method.
  • Admin Can delete a group that has no users via /api/groups/{id} using DELETE method.
  • Admin Can list all memberships between users and groups via /api/memberships using GET method.
  • Admin Can create membership between user and group via /api/memberships using POST method.
  • Admin Can delete membership between user and group via /api/memberships/{id} using DELETE method.

API Documentation

Please check swagger.yml file

Running

 php bin/console server:run 
NOTE

use X-AUTH-TOKEN header value REAL_TOKEN from fixtures.

This will use default port 8000

Testing

 php bin/phpunit
Note:

Please don't forget to change database URL from .env.test file

About


Languages

Language:PHP 99.5%Language:HTML 0.5%