/*
* Service Collaborateur API
*
* Api du service Collaborateur, utilisée pour récupérer les données des collaborateurs d'Apside
*
* OpenAPI spec version: 1.1.3
* Contact: lilian.gayet@apside-groupe.com
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*/
using System;
using System.Collections.Generic;
using Microsoft.AspNetCore.Mvc;
using Swashbuckle.AspNetCore.Annotations;
using Swashbuckle.AspNetCore.SwaggerGen;
using Newtonsoft.Json;
using System.ComponentModel.DataAnnotations;
using IO.Swagger.Attributes;
using Microsoft.AspNetCore.Authorization;
using IO.Swagger.Models;
namespace IO.Swagger.Controllers
{
///
///
///
[ApiController]
public class ProjetApiController : ControllerBase
{
///
/// ajout d'un nouveau projet
///
///
/// Opération terminée avec succès
/// Mauvais paramètre
[HttpPost]
[Route("/projets")]
[ValidateModelState]
[SwaggerOperation("AjoutProjet")]
public virtual IActionResult AjoutProjet([FromBody]NouveauProjet body)
{
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
// return StatusCode(200);
//TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
// return StatusCode(400);
throw new NotImplementedException();
}
///
/// rechercher un projet
///
/// rechercher un projet à l'aide de son identifiant
/// Ce paramêtre permet de renseigner l'identifiant du projet recherché
/// résultat de la recherche
/// Mauvais paramètre
/// il n'y a pas de d'objet recherché possédant cet id
[HttpGet]
[Route("/projets/{projetId}")]
[ValidateModelState]
[SwaggerOperation("ChercherProjet")]
[SwaggerResponse(statusCode: 200, type: typeof(Projet), description: "résultat de la recherche")]
public virtual IActionResult ChercherProjet([FromRoute][Required]long? projetId)
{
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
// return StatusCode(200, default(Projet));
//TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
// return StatusCode(400);
//TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
// return StatusCode(404);
string exampleJson = null;
exampleJson = "{\n \"debut\" : \"2000-01-23\",\n \"client\" : \"client\",\n \"description\" : \"description\",\n \"fin\" : \"2000-01-23\",\n \"id\" : 5,\n \"nom\" : \"nom\"\n}";
var example = exampleJson != null
? JsonConvert.DeserializeObject(exampleJson)
: default(Projet); //TODO: Change the data returned
return new ObjectResult(example);
}
///
/// rechercher toutes les projets
///
/// Cette requette demande de récupérer tous les projets existants
/// résultats de la recherche
/// Mauvais paramètre
/// il n'y a pas de projet
[HttpGet]
[Route("/projets")]
[ValidateModelState]
[SwaggerOperation("ChercherProjets")]
[SwaggerResponse(statusCode: 200, type: typeof(List), description: "résultats de la recherche")]
public virtual IActionResult ChercherProjets()
{
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
// return StatusCode(200, default(List));
//TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
// return StatusCode(400);
//TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
// return StatusCode(404);
string exampleJson = null;
exampleJson = "[ {\n \"debut\" : \"2000-01-23\",\n \"client\" : \"client\",\n \"description\" : \"description\",\n \"fin\" : \"2000-01-23\",\n \"id\" : 5,\n \"nom\" : \"nom\"\n}, {\n \"debut\" : \"2000-01-23\",\n \"client\" : \"client\",\n \"description\" : \"description\",\n \"fin\" : \"2000-01-23\",\n \"id\" : 5,\n \"nom\" : \"nom\"\n} ]";
var example = exampleJson != null
? JsonConvert.DeserializeObject>(exampleJson)
: default(List); //TODO: Change the data returned
return new ObjectResult(example);
}
///
/// rechercher tous les projets
///
/// Cette requette demande de récupérer tous les projets existants
/// Ce paramêtre permet de renseigner le nom du client lié au projet
/// résultats de la recherche
/// Mauvais paramètre
/// il n'y a pas de projet
[HttpGet]
[Route("/projets/{nomClient}")]
[ValidateModelState]
[SwaggerOperation("ChercherProjetsClient")]
[SwaggerResponse(statusCode: 200, type: typeof(List), description: "résultats de la recherche")]
public virtual IActionResult ChercherProjetsClient([FromRoute][Required]string nomClient)
{
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
// return StatusCode(200, default(List));
//TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
// return StatusCode(400);
//TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
// return StatusCode(404);
string exampleJson = null;
exampleJson = "[ {\n \"debut\" : \"2000-01-23\",\n \"client\" : \"client\",\n \"description\" : \"description\",\n \"fin\" : \"2000-01-23\",\n \"id\" : 5,\n \"nom\" : \"nom\"\n}, {\n \"debut\" : \"2000-01-23\",\n \"client\" : \"client\",\n \"description\" : \"description\",\n \"fin\" : \"2000-01-23\",\n \"id\" : 5,\n \"nom\" : \"nom\"\n} ]";
var example = exampleJson != null
? JsonConvert.DeserializeObject>(exampleJson)
: default(List); //TODO: Change the data returned
return new ObjectResult(example);
}
///
/// mettre à jour un projet
///
/// Ce paramêtre permet de renseigner l'identifiant du projet recherché
///
/// Opération terminée avec succès
/// Mauvais paramètre
[HttpPut]
[Route("/projets/{projetId}")]
[ValidateModelState]
[SwaggerOperation("MajProjet")]
public virtual IActionResult MajProjet([FromRoute][Required]long? projetId, [FromBody]NouveauProjet body)
{
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
// return StatusCode(200);
//TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
// return StatusCode(400);
throw new NotImplementedException();
}
///
/// mettre à jour un projet
///
/// Ce paramêtre permet de renseigner l'identifiant du projet recherché
///
/// Opération terminée avec succès
/// Mauvais paramètre
[HttpPatch]
[Route("/projets/{projetId}")]
[ValidateModelState]
[SwaggerOperation("MajProjetpatch")]
public virtual IActionResult MajProjetpatch([FromRoute][Required]long? projetId, [FromBody]NouveauProjet body)
{
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
// return StatusCode(200);
//TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
// return StatusCode(400);
throw new NotImplementedException();
}
}
}