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))] public List GetIskolaorList() { return ModelToDto(((IskolaorFacade)Activator.CreateInstance(typeof(IskolaorFacade), FelhasznaloLogic.GetFelhasznalo())).ListIskolaor()); } } }