/* * API du serveur de l'application de digitalisation des EP * * API qui sra utilisée afin de faire communiquer le client et le serveur ainsi que le serveur et la boîte noire. * * OpenAPI spec version: 1.3.4 * * 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 IO.Swagger.Security; using Microsoft.AspNetCore.Authorization; using IO.Swagger.DTO; namespace IO.Swagger.Controllers { /// /// /// [ApiController] public class DemandesFormationApiController : ControllerBase { /// /// /// /// Créer une demande de formation pour un collaborateur /// /// Demande formation créée /// Acces interdit [HttpPost] [Route("/api/demandeformation")] [Authorize(AuthenticationSchemes = BearerAuthenticationHandler.SchemeName)] [ValidateModelState] [SwaggerOperation("CreerDemandeFormation")] [SwaggerResponse(statusCode: 403, type: typeof(ErreurDTO), description: "Acces interdit")] public virtual IActionResult CreerDemandeFormation([FromBody]CreationDemandeFormationDTO body) { //TODO: Uncomment the next line to return response 201 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(201); //TODO: Uncomment the next line to return response 403 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(403, default(ErreurDTO)); throw new NotImplementedException(); } /// /// /// /// Récupérer la liste des demandes de formations /// Préciser si les données sont dans l'ordre (true) ou dans l'ordre inverse (false) /// Numéro de la page du tableau qui affiche les données /// Nombre d'éléments affiché sur chaque page du tableau /// id de l'agence à laquelle sont rattachées les données à récupérer /// Texte permettant d'identifier l'objet rechercher /// Thème des demandes de formation à récupérer /// Colonne du tableau sur lequel le tri s'effectue /// OK /// Acces interdit [HttpGet] [Route("/api/demandeformation")] [Authorize(AuthenticationSchemes = BearerAuthenticationHandler.SchemeName)] [ValidateModelState] [SwaggerOperation("GetDemandesFormation")] [SwaggerResponse(statusCode: 200, type: typeof(List), description: "OK")] [SwaggerResponse(statusCode: 403, type: typeof(ErreurDTO), description: "Acces interdit")] public virtual IActionResult GetDemandesFormation([FromQuery][Required()]bool? asc, [FromQuery][Required()]int? numPage, [FromQuery][Required()]int? parPAge, [FromQuery]long? idAgence, [FromQuery]string texte, [FromQuery]int? theme, [FromQuery]string tri) { //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 403 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(403, default(ErreurDTO)); string exampleJson = null; exampleJson = "[ {\n \"reponse\" : true,\n \"commentaireRefus\" : \"commentaireRefus\",\n \"libelle\" : \"libelle\",\n \"description\" : \"description\",\n \"dateDerniereReponse\" : \"2000-01-23T04:56:07.000+00:00\",\n \"theme\" : {\n \"id\" : 9,\n \"demandesFormation\" : [ null, null ],\n \"nom\" : \"nom\"\n },\n \"id\" : 7,\n \"ep\" : {\n \"obligatoire\" : true,\n \"dateDisponibilite\" : \"2000-01-23T04:56:07.000+00:00\",\n \"id\" : 0,\n \"datePrevisionnelle\" : \"2000-01-23T04:56:07.000+00:00\",\n \"type\" : 6,\n \"collaborateur\" : {\n \"businessUnit\" : {\n \"agence\" : {\n \"bu\" : [ null, null ],\n \"id\" : 6,\n \"nom\" : \"nom\"\n },\n \"id\" : 0,\n \"nom\" : \"nom\"\n },\n \"referent\" : {\n \"mailApside\" : \"\",\n \"id\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\",\n \"nom\" : \"nom\",\n \"prenom\" : \"prenom\",\n \"collaborateurs\" : [ null, null ]\n },\n \"mailApside\" : \"\",\n \"dateArrivee\" : \"2000-01-23T04:56:07.000+00:00\",\n \"id\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\",\n \"dateDepart\" : \"2000-01-23T04:56:07.000+00:00\",\n \"nom\" : \"nom\",\n \"prenom\" : \"prenom\"\n },\n \"statut\" : 1\n },\n \"demandeRH\" : false,\n \"dateDemande\" : \"2000-01-23T04:56:07.000+00:00\"\n}, {\n \"reponse\" : true,\n \"commentaireRefus\" : \"commentaireRefus\",\n \"libelle\" : \"libelle\",\n \"description\" : \"description\",\n \"dateDerniereReponse\" : \"2000-01-23T04:56:07.000+00:00\",\n \"theme\" : {\n \"id\" : 9,\n \"demandesFormation\" : [ null, null ],\n \"nom\" : \"nom\"\n },\n \"id\" : 7,\n \"ep\" : {\n \"obligatoire\" : true,\n \"dateDisponibilite\" : \"2000-01-23T04:56:07.000+00:00\",\n \"id\" : 0,\n \"datePrevisionnelle\" : \"2000-01-23T04:56:07.000+00:00\",\n \"type\" : 6,\n \"collaborateur\" : {\n \"businessUnit\" : {\n \"agence\" : {\n \"bu\" : [ null, null ],\n \"id\" : 6,\n \"nom\" : \"nom\"\n },\n \"id\" : 0,\n \"nom\" : \"nom\"\n },\n \"referent\" : {\n \"mailApside\" : \"\",\n \"id\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\",\n \"nom\" : \"nom\",\n \"prenom\" : \"prenom\",\n \"collaborateurs\" : [ null, null ]\n },\n \"mailApside\" : \"\",\n \"dateArrivee\" : \"2000-01-23T04:56:07.000+00:00\",\n \"id\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\",\n \"dateDepart\" : \"2000-01-23T04:56:07.000+00:00\",\n \"nom\" : \"nom\",\n \"prenom\" : \"prenom\"\n },\n \"statut\" : 1\n },\n \"demandeRH\" : false,\n \"dateDemande\" : \"2000-01-23T04:56:07.000+00:00\"\n} ]"; var example = exampleJson != null ? JsonConvert.DeserializeObject>(exampleJson) : default(List); //TODO: Change the data returned return new ObjectResult(example); } /// /// /// /// Récupérer la liste des demandes de formations en attente d'une réponse /// Préciser si les données sont dans l'ordre (true) ou dans l'ordre inverse (false) /// Numéro de la page du tableau qui affiche les données /// Nombre d'éléments affiché sur chaque page du tableau /// id de l'agence à laquelle sont rattachées les données à récupérer /// Texte permettant d'identifier l'objet rechercher /// Thème des demandes de formation à récupérer /// Colonne du tableau sur lequel le tri s'effectue /// OK /// Acces interdit [HttpGet] [Route("/api/demandeformation/enattente")] [Authorize(AuthenticationSchemes = BearerAuthenticationHandler.SchemeName)] [ValidateModelState] [SwaggerOperation("GetDemandesFormationEnAttente")] [SwaggerResponse(statusCode: 200, type: typeof(List), description: "OK")] [SwaggerResponse(statusCode: 403, type: typeof(ErreurDTO), description: "Acces interdit")] public virtual IActionResult GetDemandesFormationEnAttente([FromQuery][Required()]bool? asc, [FromQuery][Required()]int? numPage, [FromQuery][Required()]int? parPAge, [FromQuery]long? idAgence, [FromQuery]string texte, [FromQuery]int? theme, [FromQuery]string tri) { //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 403 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(403, default(ErreurDTO)); string exampleJson = null; exampleJson = "[ {\n \"reponse\" : true,\n \"commentaireRefus\" : \"commentaireRefus\",\n \"libelle\" : \"libelle\",\n \"description\" : \"description\",\n \"dateDerniereReponse\" : \"2000-01-23T04:56:07.000+00:00\",\n \"theme\" : {\n \"id\" : 9,\n \"demandesFormation\" : [ null, null ],\n \"nom\" : \"nom\"\n },\n \"id\" : 7,\n \"ep\" : {\n \"obligatoire\" : true,\n \"dateDisponibilite\" : \"2000-01-23T04:56:07.000+00:00\",\n \"id\" : 0,\n \"datePrevisionnelle\" : \"2000-01-23T04:56:07.000+00:00\",\n \"type\" : 6,\n \"collaborateur\" : {\n \"businessUnit\" : {\n \"agence\" : {\n \"bu\" : [ null, null ],\n \"id\" : 6,\n \"nom\" : \"nom\"\n },\n \"id\" : 0,\n \"nom\" : \"nom\"\n },\n \"referent\" : {\n \"mailApside\" : \"\",\n \"id\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\",\n \"nom\" : \"nom\",\n \"prenom\" : \"prenom\",\n \"collaborateurs\" : [ null, null ]\n },\n \"mailApside\" : \"\",\n \"dateArrivee\" : \"2000-01-23T04:56:07.000+00:00\",\n \"id\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\",\n \"dateDepart\" : \"2000-01-23T04:56:07.000+00:00\",\n \"nom\" : \"nom\",\n \"prenom\" : \"prenom\"\n },\n \"statut\" : 1\n },\n \"demandeRH\" : false,\n \"dateDemande\" : \"2000-01-23T04:56:07.000+00:00\"\n}, {\n \"reponse\" : true,\n \"commentaireRefus\" : \"commentaireRefus\",\n \"libelle\" : \"libelle\",\n \"description\" : \"description\",\n \"dateDerniereReponse\" : \"2000-01-23T04:56:07.000+00:00\",\n \"theme\" : {\n \"id\" : 9,\n \"demandesFormation\" : [ null, null ],\n \"nom\" : \"nom\"\n },\n \"id\" : 7,\n \"ep\" : {\n \"obligatoire\" : true,\n \"dateDisponibilite\" : \"2000-01-23T04:56:07.000+00:00\",\n \"id\" : 0,\n \"datePrevisionnelle\" : \"2000-01-23T04:56:07.000+00:00\",\n \"type\" : 6,\n \"collaborateur\" : {\n \"businessUnit\" : {\n \"agence\" : {\n \"bu\" : [ null, null ],\n \"id\" : 6,\n \"nom\" : \"nom\"\n },\n \"id\" : 0,\n \"nom\" : \"nom\"\n },\n \"referent\" : {\n \"mailApside\" : \"\",\n \"id\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\",\n \"nom\" : \"nom\",\n \"prenom\" : \"prenom\",\n \"collaborateurs\" : [ null, null ]\n },\n \"mailApside\" : \"\",\n \"dateArrivee\" : \"2000-01-23T04:56:07.000+00:00\",\n \"id\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\",\n \"dateDepart\" : \"2000-01-23T04:56:07.000+00:00\",\n \"nom\" : \"nom\",\n \"prenom\" : \"prenom\"\n },\n \"statut\" : 1\n },\n \"demandeRH\" : false,\n \"dateDemande\" : \"2000-01-23T04:56:07.000+00:00\"\n} ]"; var example = exampleJson != null ? JsonConvert.DeserializeObject>(exampleJson) : default(List); //TODO: Change the data returned return new ObjectResult(example); } /// /// /// /// Récupérer la liste des demandes de formations ayant reçu une réponse /// Préciser si les données sont dans l'ordre (true) ou dans l'ordre inverse (false) /// Numéro de la page du tableau qui affiche les données /// Nombre d'éléments affiché sur chaque page du tableau /// id de l'agence à laquelle sont rattachées les données à récupérer /// Texte permettant d'identifier l'objet rechercher /// Thème des demandes de formation à récupérer /// Colonne du tableau sur lequel le tri s'effectue /// OK /// Acces interdit [HttpGet] [Route("/api/demandeformation/repondus")] [Authorize(AuthenticationSchemes = BearerAuthenticationHandler.SchemeName)] [ValidateModelState] [SwaggerOperation("GetDemandesFormationRepondues")] [SwaggerResponse(statusCode: 200, type: typeof(List), description: "OK")] [SwaggerResponse(statusCode: 403, type: typeof(ErreurDTO), description: "Acces interdit")] public virtual IActionResult GetDemandesFormationRepondues([FromQuery][Required()]bool? asc, [FromQuery][Required()]int? numPage, [FromQuery][Required()]int? parPAge, [FromQuery]long? idAgence, [FromQuery]string texte, [FromQuery]int? theme, [FromQuery]string tri) { //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 403 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(403, default(ErreurDTO)); string exampleJson = null; exampleJson = "[ {\n \"reponse\" : true,\n \"commentaireRefus\" : \"commentaireRefus\",\n \"libelle\" : \"libelle\",\n \"description\" : \"description\",\n \"dateDerniereReponse\" : \"2000-01-23T04:56:07.000+00:00\",\n \"theme\" : {\n \"id\" : 9,\n \"demandesFormation\" : [ null, null ],\n \"nom\" : \"nom\"\n },\n \"id\" : 7,\n \"ep\" : {\n \"obligatoire\" : true,\n \"dateDisponibilite\" : \"2000-01-23T04:56:07.000+00:00\",\n \"id\" : 0,\n \"datePrevisionnelle\" : \"2000-01-23T04:56:07.000+00:00\",\n \"type\" : 6,\n \"collaborateur\" : {\n \"businessUnit\" : {\n \"agence\" : {\n \"bu\" : [ null, null ],\n \"id\" : 6,\n \"nom\" : \"nom\"\n },\n \"id\" : 0,\n \"nom\" : \"nom\"\n },\n \"referent\" : {\n \"mailApside\" : \"\",\n \"id\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\",\n \"nom\" : \"nom\",\n \"prenom\" : \"prenom\",\n \"collaborateurs\" : [ null, null ]\n },\n \"mailApside\" : \"\",\n \"dateArrivee\" : \"2000-01-23T04:56:07.000+00:00\",\n \"id\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\",\n \"dateDepart\" : \"2000-01-23T04:56:07.000+00:00\",\n \"nom\" : \"nom\",\n \"prenom\" : \"prenom\"\n },\n \"statut\" : 1\n },\n \"demandeRH\" : false,\n \"dateDemande\" : \"2000-01-23T04:56:07.000+00:00\"\n}, {\n \"reponse\" : true,\n \"commentaireRefus\" : \"commentaireRefus\",\n \"libelle\" : \"libelle\",\n \"description\" : \"description\",\n \"dateDerniereReponse\" : \"2000-01-23T04:56:07.000+00:00\",\n \"theme\" : {\n \"id\" : 9,\n \"demandesFormation\" : [ null, null ],\n \"nom\" : \"nom\"\n },\n \"id\" : 7,\n \"ep\" : {\n \"obligatoire\" : true,\n \"dateDisponibilite\" : \"2000-01-23T04:56:07.000+00:00\",\n \"id\" : 0,\n \"datePrevisionnelle\" : \"2000-01-23T04:56:07.000+00:00\",\n \"type\" : 6,\n \"collaborateur\" : {\n \"businessUnit\" : {\n \"agence\" : {\n \"bu\" : [ null, null ],\n \"id\" : 6,\n \"nom\" : \"nom\"\n },\n \"id\" : 0,\n \"nom\" : \"nom\"\n },\n \"referent\" : {\n \"mailApside\" : \"\",\n \"id\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\",\n \"nom\" : \"nom\",\n \"prenom\" : \"prenom\",\n \"collaborateurs\" : [ null, null ]\n },\n \"mailApside\" : \"\",\n \"dateArrivee\" : \"2000-01-23T04:56:07.000+00:00\",\n \"id\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\",\n \"dateDepart\" : \"2000-01-23T04:56:07.000+00:00\",\n \"nom\" : \"nom\",\n \"prenom\" : \"prenom\"\n },\n \"statut\" : 1\n },\n \"demandeRH\" : false,\n \"dateDemande\" : \"2000-01-23T04:56:07.000+00:00\"\n} ]"; var example = exampleJson != null ? JsonConvert.DeserializeObject>(exampleJson) : default(List); //TODO: Change the data returned return new ObjectResult(example); } /// /// /// /// Récupérer la liste des origines des demandes de formation /// OK /// Acces interdit [HttpGet] [Route("/api/originesdemandesformation")] [Authorize(AuthenticationSchemes = BearerAuthenticationHandler.SchemeName)] [ValidateModelState] [SwaggerOperation("GetOriginesDemandesFormation")] [SwaggerResponse(statusCode: 200, type: typeof(List), description: "OK")] [SwaggerResponse(statusCode: 403, type: typeof(ErreurDTO), description: "Acces interdit")] public virtual IActionResult GetOriginesDemandesFormation() { //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 403 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(403, default(ErreurDTO)); string exampleJson = null; exampleJson = "[ {\n \"libelle\" : \"libelle\",\n \"id\" : 0\n}, {\n \"libelle\" : \"libelle\",\n \"id\" : 0\n} ]"; var example = exampleJson != null ? JsonConvert.DeserializeObject>(exampleJson) : default(List); //TODO: Change the data returned return new ObjectResult(example); } /// /// /// /// Récupérer la liste des thèmes des demandes de formation /// OK /// Acces interdit [HttpGet] [Route("/api/themes")] [Authorize(AuthenticationSchemes = BearerAuthenticationHandler.SchemeName)] [ValidateModelState] [SwaggerOperation("GetThemes")] [SwaggerResponse(statusCode: 200, type: typeof(List), description: "OK")] [SwaggerResponse(statusCode: 403, type: typeof(ErreurDTO), description: "Acces interdit")] public virtual IActionResult GetThemes() { //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 403 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(403, default(ErreurDTO)); string exampleJson = null; exampleJson = "[ {\n \"id\" : 9,\n \"demandesFormation\" : [ null, null ],\n \"nom\" : \"nom\"\n}, {\n \"id\" : 9,\n \"demandesFormation\" : [ null, null ],\n \"nom\" : \"nom\"\n} ]"; var example = exampleJson != null ? JsonConvert.DeserializeObject>(exampleJson) : default(List); //TODO: Change the data returned return new ObjectResult(example); } /// /// /// /// Répondre a une demande de formation et la mettre à jour /// /// id demande formation /// demande formation mise à jour /// Demande formation créée /// Acces interdit [HttpPut] [Route("/api/demandeformation/{idDemandeFormation}/repondre")] [Authorize(AuthenticationSchemes = BearerAuthenticationHandler.SchemeName)] [ValidateModelState] [SwaggerOperation("RepondreDemandeFormation")] [SwaggerResponse(statusCode: 403, type: typeof(ErreurDTO), description: "Acces interdit")] public virtual IActionResult RepondreDemandeFormation([FromBody]DemandeFormationDTO body, [FromRoute][Required]long? idDemandeFormation) { //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 201 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(201); //TODO: Uncomment the next line to return response 403 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(403, default(ErreurDTO)); throw new NotImplementedException(); } } }