41 lines
2.4 KiB
C#
41 lines
2.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Net;
|
|
using System.Web.Http;
|
|
using Kreta.Naplo.BusinessLogic.V3.Tanmenet;
|
|
using Kreta.Naplo.Domain.V3.Enum;
|
|
using Kreta.Naplo.Dto.V3.Exception;
|
|
using Kreta.Naplo.Dto.V3.Tanmenet;
|
|
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 TanmenetController : ApiController
|
|
{
|
|
[HttpGet, Route("Tanmenet")]
|
|
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.TanmenetResponseLeiras, typeof(TanmenetItemListResponseDto))]
|
|
[SwaggerResponseExample(HttpStatusCode.OK, typeof(DummyListExampleProvider<TanmenetController, TanmenetItemListResponseDto>))]
|
|
public IEnumerable<TanmenetItemListResponseDto> ListTanmenet([FromUri] TanmenetRequestDto request)
|
|
{
|
|
return ModelToDto(((TanmenetFacade)Activator.CreateInstance(typeof(TanmenetFacade), FelhasznaloLogic.GetFelhasznalo())).ListTanmenet(request));
|
|
}
|
|
}
|
|
}
|