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; } /// /// Nem hívható, technikai endpoint. Rendszerben megtalálható enum értékek lekérdezése. /// [HttpGet, Route("DummyEnum")] [SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.DummyEnumResponseLeiras, typeof(Dictionary)), SwaggerResponseExample(HttpStatusCode.OK, typeof(DummyEnumExampleProvider))] #pragma warning disable S4049 // Properties should be preferred public Dictionary GetDummyEnum() => new Dictionary(); #pragma warning restore S4049 // Properties should be preferred /// /// Nem hívható, technikai endpoint. Még el nem készült BE fejlesztések tesztelésére. /// [HttpGet, Route("ListDummy")] [SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.ListDummyResponseLeiras, typeof(List))] [IdpAuthorize(FelhasznaloSzerepkor.Tanulo, FelhasznaloSzerepkor.Gondviselo)] public List ListDummy() { return ((DummyFacade)Activator.CreateInstance(typeof(DummyFacade), FelhasznaloLogic.GetFelhasznalo())).ListDummy(_logger); } } }