|
@@ -1,3 +1,52 @@
|
|
# Squad Composer
|
|
# Squad Composer
|
|
|
|
|
|
SpringBoot project to make squads.
|
|
SpringBoot project to make squads.
|
|
|
|
+
|
|
|
|
+## Back
|
|
|
|
+
|
|
|
|
+### Endpoints
|
|
|
|
+
|
|
|
|
+#### Full CRUD version
|
|
|
|
+
|
|
|
|
++ Benefits
|
|
|
|
+ + Simple
|
|
|
|
+ + Everything doable via REST
|
|
|
|
+- Bad
|
|
|
|
+ - Mix player and squad in a route
|
|
|
|
+ - Many routes
|
|
|
|
+ - Should be modified a lot to take JWT into account
|
|
|
|
+
|
|
|
|
+GET `/players` : list all players.
|
|
|
|
+
|
|
|
|
+PUT `/players` : create a player.
|
|
|
|
+
|
|
|
|
+DELETE
|
|
|
|
+
|
|
|
|
+GET `/players/{p_id}` : get a specific player
|
|
|
|
+
|
|
|
|
+GET `/players/{p_id}/squads` : get squads of this player.
|
|
|
|
+
|
|
|
|
+POST `/players/{p_id}/squads` : create a new squad ; return created s_id.
|
|
|
|
+
|
|
|
|
+PUT `/players/{p_id}/squads/{s_id}` : update a squad.
|
|
|
|
+
|
|
|
|
+GET `/players/{p_id}/squads/{s_id}` : get a specific squad.
|
|
|
|
+
|
|
|
|
+GET `/squads` : get all squads.
|
|
|
|
+
|
|
|
|
+#### Separated version
|
|
|
|
+
|
|
|
|
+GET `/players` : list all players.
|
|
|
|
+
|
|
|
|
+GET `/players/{p_id}` : get a specific player
|
|
|
|
+
|
|
|
|
+GET `/players/{p_id}/squads` : get squads of this player.
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+GET `/squads` : get all squads.
|
|
|
|
+
|
|
|
|
+GET `/squads/{s_id}` : get a specific squad.
|
|
|
|
+
|
|
|
|
+POST `/squads` : create a new squad attached to the connected player; return created s_id.
|
|
|
|
+
|
|
|
|
+PUT `/squads/{s_id}` : update a squad.
|