This commit is contained in:
skidoodle 2024-03-13 00:33:46 +01:00
commit e124a47765
19374 changed files with 9806149 additions and 0 deletions

View file

@ -0,0 +1,41 @@
using System;
using System.Collections.Generic;
using System.Net;
using System.Web.Http;
using Kreta.Naplo.BusinessLogic.V3.Iskolaor;
using Kreta.Naplo.Domain.V3.Enum;
using Kreta.Naplo.Dto.V3.Exception;
using Kreta.Naplo.Dto.V3.Iskolaor;
using Kreta.Naplo.WebApi.FilterAttributes;
using Kreta.Naplo.WebApi.V3.Common.Logic;
using Kreta.Naplo.WebApi.V3.Documentation;
using Swashbuckle.Examples;
using Swashbuckle.Swagger.Annotations;
using static Kreta.Naplo.Dto.V3.Converter.ResponseModelConverter;
namespace Kreta.Naplo.WebApi.V3.Controllers
{
[ApiKeyAuthorization]
[IdpAuthorize(FelhasznaloSzerepkor.Tanar)]
[RoutePrefix(Constants.RoutePrefix)]
[SwaggerResponse(HttpStatusCode.InternalServerError, DescriptionLookUp.IsmeretlenHibaTortentResponseLeiras, typeof(NaploExceptionResponseDto))]
[SwaggerResponseExample(HttpStatusCode.InternalServerError, typeof(IsmeretlenHibaExample))]
[SwaggerResponse(HttpStatusCode.Unauthorized, DescriptionLookUp.JogosulatlanTokenLejartResponseLeiras, typeof(string))]
[SwaggerResponseExample(HttpStatusCode.Unauthorized, typeof(LejartTokenExample))]
[SwaggerResponse(HttpStatusCode.Forbidden, DescriptionLookUp.HozzaferesMegtagadvaResponseLeiras, typeof(string))]
[SwaggerResponseExample(HttpStatusCode.Forbidden, typeof(PermissionDeniedExample))]
[SwaggerResponse(HttpStatusCode.RequestTimeout, DescriptionLookUp.KeresTullepteMaxFutasiIdot, typeof(NaploExceptionResponseDto))]
[SwaggerResponseExample(HttpStatusCode.RequestTimeout, typeof(TimeOutExample))]
[SwaggerResponse(HttpStatusCode.Conflict, DescriptionLookUp.TanevetValtottAzIntezmeny, typeof(NaploExceptionResponseDto))]
[SwaggerResponseExample(HttpStatusCode.Conflict, typeof(IntezmenyMarTanevetValtottExample))]
public class IskolaorController : ApiController
{
[HttpGet, Route("Iskolaor")]
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.IskolaorResponseLeiras, typeof(IskolaorResponseDto))]
[SwaggerResponseExample(HttpStatusCode.OK, typeof(DummyExampleProvider<IskolaorController, IskolaorResponseDto>))]
public List<IskolaorResponseDto> GetIskolaorList()
{
return ModelToDto(((IskolaorFacade)Activator.CreateInstance(typeof(IskolaorFacade), FelhasznaloLogic.GetFelhasznalo())).ListIskolaor());
}
}
}