45 lines
1.9 KiB
C#
45 lines
1.9 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Net;
|
|
using System.Web.Http;
|
|
using Kreta.Ellenorzo.BL.VN.Dummy;
|
|
using Kreta.Ellenorzo.Enums;
|
|
using Kreta.Ellenorzo.WebApi.FilterAttributes;
|
|
using Kreta.Ellenorzo.WebApi.VN.Documentation;
|
|
using Kreta.Ellenorzo.WebApi.VN.Logic;
|
|
using Kreta.Web.Logging.Abstractions;
|
|
using Swashbuckle.Examples;
|
|
using Swashbuckle.Swagger.Annotations;
|
|
|
|
namespace Kreta.Ellenorzo.WebApi.VN.Controllers
|
|
{
|
|
[RoutePrefix(Constants.RoutePrefix)]
|
|
public class DummyEnumDocumentationController : ApiController
|
|
{
|
|
private readonly ITraceLogger _logger;
|
|
public DummyEnumDocumentationController(ITraceLogger traceLogger)
|
|
{
|
|
_logger = traceLogger;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Nem hívható, technikai endpoint. Rendszerben megtalálható enum értékek lekérdezése.
|
|
/// </summary>
|
|
[HttpGet, Route("DummyEnum")]
|
|
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.DummyEnumResponseLeiras, typeof(Dictionary<string, string>)), SwaggerResponseExample(HttpStatusCode.OK, typeof(DummyEnumExampleProvider))]
|
|
#pragma warning disable S4049 // Properties should be preferred
|
|
public Dictionary<string, string> GetDummyEnum() => new Dictionary<string, string>();
|
|
#pragma warning restore S4049 // Properties should be preferred
|
|
|
|
/// <summary>
|
|
/// Nem hívható, technikai endpoint. Még el nem készült BE fejlesztések tesztelésére.
|
|
/// </summary>
|
|
[HttpGet, Route("ListDummy")]
|
|
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.ListDummyResponseLeiras, typeof(List<object>))]
|
|
[IdpAuthorize(FelhasznaloSzerepkor.Tanulo, FelhasznaloSzerepkor.Gondviselo)]
|
|
public List<object> ListDummy()
|
|
{
|
|
return ((DummyFacade)Activator.CreateInstance(typeof(DummyFacade), FelhasznaloLogic.GetFelhasznalo())).ListDummy(_logger);
|
|
}
|
|
}
|
|
}
|