init
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Web.Http;
|
||||
using Kreta.Ellenorzo.BL.VN.OsztalyCsoport;
|
||||
using Kreta.Ellenorzo.Dto.VN.Exception;
|
||||
using Kreta.Ellenorzo.Dto.VN.OsztalyCsoport;
|
||||
using Kreta.Ellenorzo.Enums;
|
||||
using Kreta.Ellenorzo.Web.FilterAttributes;
|
||||
using Kreta.Ellenorzo.WebApi.FilterAttributes;
|
||||
using Kreta.Ellenorzo.WebApi.VN.Documentation;
|
||||
using Kreta.Ellenorzo.WebApi.VN.Logic;
|
||||
using Swashbuckle.Examples;
|
||||
using Swashbuckle.Swagger.Annotations;
|
||||
using static Kreta.Ellenorzo.Dto.VN.Converter.ResponseModelConverter;
|
||||
|
||||
namespace Kreta.Ellenorzo.WebApi.VN.Controllers
|
||||
{
|
||||
[ApiKeyAuthorization]
|
||||
[IdpAuthorize(FelhasznaloSzerepkor.Tanulo, FelhasznaloSzerepkor.Gondviselo)]
|
||||
[RoutePrefix(Constants.RoutePrefix)]
|
||||
[SwaggerResponse(HttpStatusCode.InternalServerError, DescriptionLookUp.IsmeretlenHibaTortentResponseLeiras, typeof(EllenorzoExceptionResponseDto))]
|
||||
[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.Conflict, DescriptionLookUp.TanevetValtottAzIntezmeny, typeof(EllenorzoExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.Conflict, typeof(IntezmenyMarTanevetValtottExample))]
|
||||
public class OsztalyCsoportController : ApiController
|
||||
{
|
||||
/// <summary>
|
||||
/// Osztályok és csoportok, amikbe a tanuló valaha be volt sorolva az aktuális tanévben.
|
||||
/// </summary>
|
||||
[HttpGet, Route("Sajat/OsztalyCsoportok")]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.OsztalyCsoportLeiras + DescriptionOneNote.OsztalyCsoportok, typeof(TanuloOsztalyCsoportListResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.OK, typeof(DummyListExampleProvider<OsztalyCsoportController, TanuloOsztalyCsoportListResponseDto>))]
|
||||
public HashSet<TanuloOsztalyCsoportListResponseDto> ListTanuloOsztalyCsoport()
|
||||
{
|
||||
return ModelToDtoForTanulo(((OsztalyCsoportFacade)Activator.CreateInstance(typeof(OsztalyCsoportFacade), FelhasznaloLogic.GetFelhasznalo())).ListTanuloOsztalyCsoport());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user