/* * 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 ParticipationsFormationsApiController : ControllerBase { /// /// /// /// Consulter une évaluation d'une formation /// id participation formation /// OK /// Acces interdit /// Ressource n'a pas été trouvée [HttpGet] [Route("/api/evaluations/participationformation/{idParticipationFormation}")] [Authorize(AuthenticationSchemes = BearerAuthenticationHandler.SchemeName)] [ValidateModelState] [SwaggerOperation("ConsulterEvaluation")] [SwaggerResponse(statusCode: 200, type: typeof(EvaluationDTO), description: "OK")] [SwaggerResponse(statusCode: 403, type: typeof(ErreurDTO), description: "Acces interdit")] [SwaggerResponse(statusCode: 404, type: typeof(ErreurDTO), description: "Ressource n'a pas été trouvée")] public virtual IActionResult ConsulterEvaluation([FromRoute][Required]long? idParticipationFormation) { //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(EvaluationDTO)); //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)); //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404, default(ErreurDTO)); string exampleJson = null; exampleJson = "{\n \"idParticipation\" : 0,\n \"saisies\" : [ {\n \"note\" : 7,\n \"texte2\" : \"texte2\",\n \"texte\" : \"texte\",\n \"id\" : \"id\",\n \"champ\" : {\n \"typeChamp\" : \"typeChamp\",\n \"ordre\" : 5,\n \"texte\" : \"texte\",\n \"section\" : \"section\",\n \"soussection\" : \"soussection\",\n \"id\" : 4,\n \"typeSaisie\" : \"typeSaisie\"\n },\n \"typeSaisie\" : 6,\n \"niveau\" : 1\n }, {\n \"note\" : 7,\n \"texte2\" : \"texte2\",\n \"texte\" : \"texte\",\n \"id\" : \"id\",\n \"champ\" : {\n \"typeChamp\" : \"typeChamp\",\n \"ordre\" : 5,\n \"texte\" : \"texte\",\n \"section\" : \"section\",\n \"soussection\" : \"soussection\",\n \"id\" : 4,\n \"typeSaisie\" : \"typeSaisie\"\n },\n \"typeSaisie\" : 6,\n \"niveau\" : 1\n } ]\n}"; var example = exampleJson != null ? JsonConvert.DeserializeObject(exampleJson) : default(EvaluationDTO); //TODO: Change the data returned return new ObjectResult(example); } /// /// /// /// Evaluer une formation /// /// id participation formation /// Evaluation envoyée avec succès /// Acces interdit /// Ressource n'a pas été trouvée [HttpPut] [Route("/api/evaluations/participationformation/{idParticipationFormation}/evaluer")] [Authorize(AuthenticationSchemes = BearerAuthenticationHandler.SchemeName)] [ValidateModelState] [SwaggerOperation("EvaluerFormation")] [SwaggerResponse(statusCode: 403, type: typeof(ErreurDTO), description: "Acces interdit")] [SwaggerResponse(statusCode: 404, type: typeof(ErreurDTO), description: "Ressource n'a pas été trouvée")] public virtual IActionResult EvaluerFormation([FromBody]EvaluationDTO body, [FromRoute][Required]long? idParticipationFormation) { //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 403 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(403, default(ErreurDTO)); //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404, default(ErreurDTO)); throw new NotImplementedException(); } /// /// /// /// Récupérer la liste des formations auxquelles est inscrit le collaborateur /// Préciser si les données sont dans l'ordre (true) ou dans l'ordre inverse (false) /// id collaborateur /// Numéro de la page du tableau qui affiche les données /// Nombre d'éléments affiché sur chaque page du tableau /// Texte permettant d'identifier l'objet rechercher /// Colonne du tableau sur lequel le tri s'effectue /// OK /// Acces interdit /// Ressource n'a pas été trouvée [HttpGet] [Route("/api/participationsformation/collaborateur/{idCollaborateur}")] [Authorize(AuthenticationSchemes = BearerAuthenticationHandler.SchemeName)] [ValidateModelState] [SwaggerOperation("GetParticipationByCollaborateur")] [SwaggerResponse(statusCode: 200, type: typeof(List), description: "OK")] [SwaggerResponse(statusCode: 403, type: typeof(ErreurDTO), description: "Acces interdit")] [SwaggerResponse(statusCode: 404, type: typeof(ErreurDTO), description: "Ressource n'a pas été trouvée")] public virtual IActionResult GetParticipationByCollaborateur([FromQuery][Required()]bool? asc, [FromRoute][Required]Guid? idCollaborateur, [FromQuery][Required()]int? numPage, [FromQuery][Required()]int? parPAge, [FromQuery]string texte, [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)); //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404, default(ErreurDTO)); string exampleJson = null; exampleJson = "[ {\n \"date\" : \"2000-01-23T04:56:07.000+00:00\",\n \"idCollaborateur\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\",\n \"estEvaluee\" : true,\n \"dateCreation\" : \"2000-01-23T04:56:07.000+00:00\",\n \"id\" : 0,\n \"formation\" : \"formation\",\n \"collaborateur\" : \"collaborateur\",\n \"statut\" : \"statut\"\n}, {\n \"date\" : \"2000-01-23T04:56:07.000+00:00\",\n \"idCollaborateur\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\",\n \"estEvaluee\" : true,\n \"dateCreation\" : \"2000-01-23T04:56:07.000+00:00\",\n \"id\" : 0,\n \"formation\" : \"formation\",\n \"collaborateur\" : \"collaborateur\",\n \"statut\" : \"statut\"\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 participants d'une formation /// Préciser si les données sont dans l'ordre (true) ou dans l'ordre inverse (false) /// id formation /// Numéro de la page du tableau qui affiche les données /// Nombre d'éléments affiché sur chaque page du tableau /// Texte permettant d'identifier l'objet rechercher /// Colonne du tableau sur lequel le tri s'effectue /// OK /// Acces interdit /// Ressource n'a pas été trouvée [HttpGet] [Route("/api/participationsformation/formation/{idFormation}")] [Authorize(AuthenticationSchemes = BearerAuthenticationHandler.SchemeName)] [ValidateModelState] [SwaggerOperation("GetParticipationByFormation")] [SwaggerResponse(statusCode: 200, type: typeof(List), description: "OK")] [SwaggerResponse(statusCode: 403, type: typeof(ErreurDTO), description: "Acces interdit")] [SwaggerResponse(statusCode: 404, type: typeof(ErreurDTO), description: "Ressource n'a pas été trouvée")] public virtual IActionResult GetParticipationByFormation([FromQuery][Required()]bool? asc, [FromRoute][Required]long? idFormation, [FromQuery][Required()]int? numPage, [FromQuery][Required()]int? parPAge, [FromQuery]string texte, [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)); //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404, default(ErreurDTO)); string exampleJson = null; exampleJson = "[ {\n \"date\" : \"2000-01-23T04:56:07.000+00:00\",\n \"idCollaborateur\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\",\n \"estEvaluee\" : true,\n \"dateCreation\" : \"2000-01-23T04:56:07.000+00:00\",\n \"id\" : 0,\n \"formation\" : \"formation\",\n \"collaborateur\" : \"collaborateur\",\n \"statut\" : \"statut\"\n}, {\n \"date\" : \"2000-01-23T04:56:07.000+00:00\",\n \"idCollaborateur\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\",\n \"estEvaluee\" : true,\n \"dateCreation\" : \"2000-01-23T04:56:07.000+00:00\",\n \"id\" : 0,\n \"formation\" : \"formation\",\n \"collaborateur\" : \"collaborateur\",\n \"statut\" : \"statut\"\n} ]"; var example = exampleJson != null ? JsonConvert.DeserializeObject>(exampleJson) : default(List); //TODO: Change the data returned return new ObjectResult(example); } } }