diff --git a/Sources/BowlingApi/Controllers/PartieController.cs b/Sources/BowlingApi/Controllers/PartieController.cs
index fc7e7a6..f8fbe59 100644
--- a/Sources/BowlingApi/Controllers/PartieController.cs
+++ b/Sources/BowlingApi/Controllers/PartieController.cs
@@ -29,9 +29,20 @@ namespace BowlingApi.Controllers
-
+ ///
+ /// Get all partie
+ /// GET: api/parti
+ ///
+ /// la liste des parti
+ /// Retourne la liste des joueurs
+ /// Si la liste est vide
+ /// Si une erreur est survenue
// GET: api/Partie
[HttpGet]
+ [ProducesResponseType(typeof(string), StatusCodes.Status500InternalServerError)]
+ [ProducesResponseType(typeof(string), StatusCodes.Status404NotFound)]
+ [ProducesResponseType(typeof(string), StatusCodes.Status400BadRequest)]
+ [ProducesResponseType(typeof(JoueurDTO), StatusCodes.Status200OK)]
public async Task Get()
{
try
@@ -78,9 +89,18 @@ namespace BowlingApi.Controllers
}
}
-
- // POST: api/Partie
+ ///
+ /// Creeation
+ /// POST: api/parti
+ ///
+ ///
+ /// Retourne la parti créé
+ /// Si la parti est null
+ /// Si une erreur est survenue
[HttpPost]
+ [ProducesResponseType(typeof(string), StatusCodes.Status500InternalServerError)]
+ [ProducesResponseType(typeof(string), StatusCodes.Status400BadRequest)]
+ [ProducesResponseType(typeof(JoueurDTO), StatusCodes.Status201Created)]
public async Task> Post([FromBody] PartieDTO parti)
{
@@ -103,8 +123,22 @@ namespace BowlingApi.Controllers
}
- // PUT: api/Partie/5
+ ///
+ /// Modification partie
+ /// PUT: api/parti/5
+ ///
+ ///
+ ///
+ /// Retourne la modification
+ /// Si le partie est null
+ /// Si le partie n'existe pas
+ /// Si une erreur est survenue
[HttpPut("{id}")]
+ [ProducesResponseType(typeof(string), StatusCodes.Status500InternalServerError)]
+ [ProducesResponseType(typeof(string), StatusCodes.Status404NotFound)]
+ [ProducesResponseType(typeof(string), StatusCodes.Status400BadRequest)]
+ [ProducesResponseType(typeof(PartieDTO), StatusCodes.Status200OK)]
+
public async Task> Put(long id, [FromBody] PartieDTO partie)
{
try