/* * 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 AgenceApiController : ControllerBase { /// /// ajout d'une nouvelle agence /// /// /// Opération terminée avec succès /// Mauvais paramètre [HttpPost] [Route("/agences")] [ValidateModelState] [SwaggerOperation("AjoutAgence")] public virtual IActionResult AjoutAgence([FromBody]NouvelleAgence 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 une adresse /// /// rechercher une agence à l'aide de son identifiant /// Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée /// résultat de la recherche /// Mauvais paramètre /// il n'y a pas de d'objet recherché possédant cet id [HttpGet] [Route("/agences/{agenceId}")] [ValidateModelState] [SwaggerOperation("ChercherAgence")] [SwaggerResponse(statusCode: 200, type: typeof(Agence), description: "résultat de la recherche")] public virtual IActionResult ChercherAgence([FromRoute][Required]long? agenceId) { //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(Agence)); //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 \"bus\" : [ null, null ],\n \"id\" : 5,\n \"nom\" : \"nom\"\n}"; var example = exampleJson != null ? JsonConvert.DeserializeObject(exampleJson) : default(Agence); //TODO: Change the data returned return new ObjectResult(example); } /// /// rechercher toutes les agences /// /// Cette requette demande de récupérer toutes les agences existantes /// résultats de la recherche /// Mauvais paramètre /// il n'y a pas d'agence [HttpGet] [Route("/agences")] [ValidateModelState] [SwaggerOperation("ChercherAgences")] [SwaggerResponse(statusCode: 200, type: typeof(List), description: "résultats de la recherche")] public virtual IActionResult ChercherAgences() { //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 \"bus\" : [ null, null ],\n \"id\" : 5,\n \"nom\" : \"nom\"\n}, {\n \"bus\" : [ null, null ],\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 une agence /// /// Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée /// /// Opération terminée avec succès /// Mauvais paramètre [HttpPut] [Route("/agences/{agenceId}")] [ValidateModelState] [SwaggerOperation("MajAgence")] public virtual IActionResult MajAgence([FromRoute][Required]long? agenceId, [FromBody]NouvelleAgence 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 une agence /// /// Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée /// /// Opération terminée avec succès /// Mauvais paramètre [HttpPatch] [Route("/agences/{agenceId}")] [ValidateModelState] [SwaggerOperation("MajAgencepatch")] public virtual IActionResult MajAgencepatch([FromRoute][Required]long? agenceId, [FromBody]NouvelleAgence 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(); } } }