init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"config": {
|
||||
"connectionStrings": [
|
||||
"Data Source=kretadevsql01\\inst02;User ID=_SQL_mobil_app;Password=7qRpZsB@Ylgi;Initial Catalog=KRETA_MOBIL_LOCAL;Connection Timeout=3000;"
|
||||
]
|
||||
}
|
||||
}
|
|
@ -0,0 +1,160 @@
|
|||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>Kreta.Naplo.Dto</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="P:Kreta.Naplo.Dto.V3.Enum.EnumRequestDto.EnumTipus">
|
||||
<summary>
|
||||
Enum típus (Engedélyezett enum-ok: ErtekelesMod (LimitaltSzamonkeresekTipusai), ErtekelesTipus, FeljegyzesTipus, MulasztasTipus, OsztalyzatTipus, IgazolasTipus, CalendarOraTypeEnum, TanoraAllapotaEnum)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Kreta.Naplo.Dto.V3.Igazolas.IgazolasCreateRequestDto.TanuloId">
|
||||
<summary>
|
||||
Tanuló id
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Kreta.Naplo.Dto.V3.Igazolas.IgazolasCreateRequestDto.OsztalyCsoportId">
|
||||
<summary>
|
||||
Osztály/csoport id
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Kreta.Naplo.Dto.V3.Igazolas.IgazolasCreateRequestDto.IgazolasKezdete">
|
||||
<summary>
|
||||
Igazolás kezdete (UTC ISO 8601)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Kreta.Naplo.Dto.V3.Igazolas.IgazolasCreateRequestDto.IgazolasVege">
|
||||
<summary>
|
||||
Igazolás vége (UTC ISO 8601)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Kreta.Naplo.Dto.V3.Igazolas.IgazolasCreateRequestDto.IgazolasTipus">
|
||||
<summary>
|
||||
Igazolás típus
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Kreta.Naplo.Dto.V3.Igazolas.IgazolasCreateRequestDto.IgazolasMegjegyzes">
|
||||
<summary>
|
||||
Igazolás megjegyzése
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Kreta.Naplo.Dto.V3.Orarend.OraNaplozasTorlesRequestDto.OrarendElemUid">
|
||||
<summary>
|
||||
Órarendi elem uid-ja (Id, OraTipusa, OraDatuma UTC ISO 8601)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Kreta.Naplo.Dto.V3.Orarend.OrarendElemRequestDto.OrarendElemUid">
|
||||
<summary>
|
||||
Órarendi elem uid-ja (Id, OraTipusa, OraDatuma UTC ISO 8601)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Kreta.Naplo.Dto.V3.Orarend.OrarendRequestDto.DatumTol">
|
||||
<summary>
|
||||
Dátum intervallum kezdete (UTC ISO 8601, másodperc pontossággal)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Kreta.Naplo.Dto.V3.Orarend.OrarendRequestDto.DatumIg">
|
||||
<summary>
|
||||
Dátum intervallum vége (UTC ISO 8601, másodperc pontossággal)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Kreta.Naplo.Dto.V3.Orarend.TanuloJelenletRequestDto.OrarendElemUid">
|
||||
<summary>
|
||||
Órarendi elem uid-ja (Id, OraTipusa, OraDatuma UTC ISO 8601)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Kreta.Naplo.Dto.V3.OsztalyCsoport.BejelentettSzamonkeresekRequestDto.OsztalyCsoportId">
|
||||
<summary>
|
||||
Osztály/csoport id
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Kreta.Naplo.Dto.V3.OsztalyCsoport.BejelentettSzamonkeresekRequestDto.Datum">
|
||||
<summary>
|
||||
Dátum
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Kreta.Naplo.Dto.V3.OsztalyCsoport.MondatbankRequestDto.TantargyId">
|
||||
<summary>
|
||||
Tantárgy id
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Kreta.Naplo.Dto.V3.OsztalyCsoport.MondatbankRequestDto.OsztalyCsoportId">
|
||||
<summary>
|
||||
Osztály/Csoport id
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Kreta.Naplo.Dto.V3.OsztalyCsoport.OsztalyCsoportTanuloRequestDto.OsztalyCsoportId">
|
||||
<summary>
|
||||
Osztály/csoport id
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Kreta.Naplo.Dto.V3.OsztalyCsoport.OsztalyCsoportTanuloRequestDto.Datum">
|
||||
<summary>
|
||||
Dátum ha nincs megadva akkor a mai nap.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Kreta.Naplo.Dto.V3.OsztalyCsoport.TanuloErtekelesekRequestDto.TanuloId">
|
||||
<summary>
|
||||
Tanuló id
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Kreta.Naplo.Dto.V3.OsztalyCsoport.TanuloErtekelesekRequestDto.TantargyId">
|
||||
<summary>
|
||||
Tantárgy id
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Kreta.Naplo.Dto.V3.OsztalyCsoport.TanuloErtekelesekRequestDto.OsztalyCsoportId">
|
||||
<summary>
|
||||
Osztály/csoport id
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Kreta.Naplo.Dto.V3.OsztalyCsoport.OsztalyCsoportErtekelesekRequestDto.TantargyId">
|
||||
<summary>
|
||||
Tantárgy id
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Kreta.Naplo.Dto.V3.OsztalyCsoport.OsztalyCsoportErtekelesekRequestDto.OsztalyCsoportId">
|
||||
<summary>
|
||||
Osztály/csoport id
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Kreta.Naplo.Dto.V3.OsztalyCsoport.OsztalyCsoportErtekelesekRequestDto.Datum">
|
||||
<summary>
|
||||
Dátum (óra vagy értékelés bejegyzés dátuma, ShortDateTime, UTC ISO 8601) opcionális
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Kreta.Naplo.Dto.V3.OsztalyCsoport.OsztalyCsoportErtekelesekRequestDto.TanuloId">
|
||||
<summary>
|
||||
Tanuló id
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Kreta.Naplo.Dto.V3.Interfaces.IDtoDocumentation">
|
||||
<summary>
|
||||
Author: Kovács Kornél (DevKornél) Created On: 2019.05.
|
||||
Az interface-t implementáló model a dokumentációban egy példaválasz fog adni
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Kreta.Naplo.Dto.V3.Interfaces.IDtoListDocumentation">
|
||||
<summary>
|
||||
Author: Kovács Kornél (DevKornél) Created On: 2019.05.
|
||||
Az interface-t implementáló model a dokumentációban egy generikus példaválasz fog adni
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Kreta.Naplo.Dto.V3.Tanmenet.TanmenetRequestDto.OsztalyCsoportId">
|
||||
<summary>
|
||||
Osztály/Csoport Id-ja
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Kreta.Naplo.Dto.V3.Tanmenet.TanmenetRequestDto.TantargyId">
|
||||
<summary>
|
||||
Tantárgy Id-ja
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Kreta.Naplo.Dto.V3.Tanmenet.TanmenetRequestDto.TanarUid">
|
||||
<summary>
|
||||
Feltöltő tanár idp uid-ja
|
||||
</summary>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
|
@ -0,0 +1,135 @@
|
|||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>Kreta.Naplo.WebApi</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:Kreta.Naplo.WebApi.WebApiConfig">
|
||||
<summary>
|
||||
Web Api configuration class
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Kreta.Naplo.WebApi.WebApiConfig.Register(System.Web.Http.HttpConfiguration)">
|
||||
<summary>
|
||||
Web Api configuration entry
|
||||
</summary>
|
||||
<param name="config">HttpConfiguration for configuring web Api</param>
|
||||
</member>
|
||||
<member name="T:Kreta.Naplo.WebApi.DependencyContainer">
|
||||
<summary>
|
||||
Dependency resolver of webapi layer
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:Kreta.Naplo.WebApi.DependencyContainer.UnknownUserAgent">
|
||||
<summary>
|
||||
Unknown user agent
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Kreta.Naplo.WebApi.DependencyContainer.Instance">
|
||||
<summary>
|
||||
Instance
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Kreta.Naplo.WebApi.DependencyContainer.OnImportedObjectResolved(System.Object)">
|
||||
<summary>
|
||||
Imported object resolved
|
||||
</summary>
|
||||
<param name="importedObject">Imported object</param>
|
||||
</member>
|
||||
<member name="M:Kreta.Naplo.WebApi.DependencyContainer.Initialize">
|
||||
<summary>
|
||||
Initialize
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Kreta.Naplo.WebApi.FilterAttributes.DefaultExceptionFilterAttribute">
|
||||
<summary>
|
||||
Deafult exception filter for handling all unhadled exceptions
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Kreta.Naplo.WebApi.FilterAttributes.DefaultExceptionFilterAttribute.OnException(System.Web.Http.Filters.HttpActionExecutedContext)">
|
||||
<summary>
|
||||
Fires when exception occurs
|
||||
</summary>
|
||||
<param name="context">Http context</param>
|
||||
</member>
|
||||
<member name="M:Kreta.Naplo.WebApi.V2.Controllers.TestV2Controller.ProfilAsync(Kreta.Naplo.Domain.V2.Model.Get.Tanar.ProfilRequest)">
|
||||
<summary>
|
||||
Tanár profil
|
||||
</summary>
|
||||
<param name="request"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Kreta.Naplo.WebApi.V2.Controllers.TestV2Controller.OraListaAsync(Kreta.Naplo.Domain.V2.Model.Get.Orarend.OraGetRequest)">
|
||||
<summary>
|
||||
Óra lista
|
||||
</summary>
|
||||
<param name="request"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Kreta.Naplo.WebApi.V2.Controllers.TestV2Controller.OraNaplozasAsync(System.Collections.Generic.List{Kreta.Naplo.Domain.V2.Model.Post.Naplozas.OraNaplozasRequest})">
|
||||
<summary>
|
||||
Naplózás
|
||||
</summary>
|
||||
<param name="request"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Kreta.Naplo.WebApi.V2.Controllers.TestV2Controller.OsztalyTanuloiAsync(Kreta.Naplo.Domain.V2.Model.Get.Tanulo.OsztalyTanuloiRequest)">
|
||||
<summary>
|
||||
Osztály tanuló lista
|
||||
</summary>
|
||||
<param name="request"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Kreta.Naplo.WebApi.V2.Controllers.TestV2Controller.MulasztasAsync(Kreta.Naplo.Domain.V2.Model.Get.Tanulo.MulasztasRequest)">
|
||||
<summary>
|
||||
Tanuló mulasztás lista
|
||||
</summary>
|
||||
<param name="request"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Kreta.Naplo.WebApi.V2.Controllers.TestV2Controller.FeljegyzesAsync(Kreta.Naplo.Domain.V2.Model.Get.Tanulo.FeljegyzesRequest)">
|
||||
<summary>
|
||||
Tanuló feljegyzés lista
|
||||
</summary>
|
||||
<param name="request"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Kreta.Naplo.WebApi.V2.Controllers.TestV2Controller.NaploEnumAsync(Kreta.Naplo.Domain.V2.Model.Get.Enum.EnumRequest)">
|
||||
<summary>
|
||||
Naplo Enum
|
||||
</summary>
|
||||
<param name="request"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:Kreta.Naplo.WebApi.V2.VersionedRouteInfo">
|
||||
<summary>
|
||||
Versioned route info
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:Kreta.Naplo.WebApi.V2.VersionedRouteInfo.RoutePrefix">
|
||||
<summary>
|
||||
Reoute prefix
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Kreta.Naplo.WebApi.WebApiLayer">
|
||||
<summary>
|
||||
Business logic layer
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:Kreta.Naplo.WebApi.WebApiLayer.instance">
|
||||
<summary>
|
||||
Instance
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Kreta.Naplo.WebApi.WebApiLayer.Instance">
|
||||
<summary>
|
||||
Instance
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Kreta.Naplo.WebApi.WebApiLayer.#cctor">
|
||||
<summary>
|
||||
Static constructor
|
||||
</summary>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
142
Kreta.WebApi/Naplo/Kreta.Naplo.WebApi/App_Start/SwaggerConfig.cs
Normal file
142
Kreta.WebApi/Naplo/Kreta.Naplo.WebApi/App_Start/SwaggerConfig.cs
Normal file
|
@ -0,0 +1,142 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Reflection;
|
||||
using System.Web.Http;
|
||||
using System.Web.Http.Description;
|
||||
using Kreta.Core.Configuratiaton;
|
||||
using Kreta.Core.Enum;
|
||||
using Kreta.Core.Exceptions;
|
||||
using Kreta.Naplo.Dto.V3.Attributes;
|
||||
using Kreta.Naplo.WebApi;
|
||||
using Swashbuckle.Application;
|
||||
using Swashbuckle.Examples;
|
||||
using Swashbuckle.Swagger;
|
||||
using WebActivatorEx;
|
||||
|
||||
[assembly: PreApplicationStartMethod(typeof(SwaggerConfig), nameof(SwaggerConfig.Register))]
|
||||
namespace Kreta.Naplo.WebApi
|
||||
{
|
||||
public class SwaggerConfig
|
||||
{
|
||||
private static readonly string Header = "header";
|
||||
|
||||
public class SwaggerChangeTypeFilter : ISchemaFilter
|
||||
{
|
||||
public void Apply(Schema schema, SchemaRegistry schemaRegistry, Type type)
|
||||
{
|
||||
if (schema?.properties == null || type == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var selectedProperties = type.GetProperties().Where(t => t.GetCustomAttribute<SwaggerChangeTypeAttribute>() != null);
|
||||
|
||||
foreach (var property in selectedProperties)
|
||||
{
|
||||
var x = schema.properties[property.Name];
|
||||
if (property.GetCustomAttribute<SwaggerChangeTypeAttribute>().NewType == typeof(string))
|
||||
{
|
||||
x.@ref = null;
|
||||
x.type = "string";
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new BlException(BlExceptionType.ElvartErtekNemTalalhato);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void Register()
|
||||
{
|
||||
if (bool.Parse(ConfigurationManager.AppSettings["IsSwaggerUiEnabled"]))
|
||||
{
|
||||
var thisAssembly = typeof(SwaggerConfig).Assembly;
|
||||
GlobalConfiguration.Configuration
|
||||
.EnableSwagger(c =>
|
||||
{
|
||||
c.MultipleApiVersions(
|
||||
(apiDesc, targetApiVersion) => ResolveVersionSupportByRouteConstraint(apiDesc, targetApiVersion),
|
||||
(vc) =>
|
||||
{
|
||||
_ = vc.Version(V3.Constants.RoutePrefix, $"Kreta.Naplo.WebApi {V3.Constants.RoutePrefix}");
|
||||
_ = vc.Version(V2.VersionedRouteInfo.RoutePrefix, $"Kreta.Naplo.WebApi {V2.VersionedRouteInfo.RoutePrefix}");
|
||||
}
|
||||
);
|
||||
|
||||
c.IncludeXmlComments(string.Format(@"{0}\App_Data\Kreta.Naplo.WebApi.XML", AppDomain.CurrentDomain.BaseDirectory));
|
||||
c.IncludeXmlComments(string.Format(@"{0}\App_Data\Kreta.Naplo.Dto.XML", AppDomain.CurrentDomain.BaseDirectory));
|
||||
c.OperationFilter<ExamplesOperationFilter>();
|
||||
c.OperationFilter<DescriptionOperationFilter>();
|
||||
c.UseFullTypeNameInSchemaIds();
|
||||
|
||||
_ = c.ApiKey("Token")
|
||||
.Description("Filling bearer token here")
|
||||
.Name("Authorization").Name("ApiKey")
|
||||
.In(Header);
|
||||
|
||||
c.OperationFilter(() => new AddAuthorizationHeaderParameter());
|
||||
c.SchemaFilter<SwaggerChangeTypeFilter>();
|
||||
c.RootUrl(ResolveBasePath);
|
||||
})
|
||||
.EnableSwaggerUi(c =>
|
||||
{
|
||||
c.InjectStylesheet(thisAssembly, "Kreta.Naplo.WebApi.Content.naplo-swagger-ui-custom.css");
|
||||
c.DocExpansion(DocExpansion.List);
|
||||
c.EnableApiKeySupport("Authorization", "header");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private static bool ResolveVersionSupportByRouteConstraint(ApiDescription apiDesc, string targetApiVersion)
|
||||
{
|
||||
string[] path = apiDesc.RelativePath.Split(new[] { '/' });
|
||||
string pathVersion = path[0];
|
||||
|
||||
return CultureInfo.InvariantCulture.CompareInfo.IndexOf(pathVersion, targetApiVersion, CompareOptions.IgnoreCase) >= 0;
|
||||
}
|
||||
|
||||
private static string ResolveBasePath(HttpRequestMessage message)
|
||||
{
|
||||
var virtualPathRoot = message.GetRequestContext().VirtualPathRoot;
|
||||
var schemeAndHost = "https://" + message.RequestUri.Host;
|
||||
return new Uri(new Uri(schemeAndHost, UriKind.Absolute), virtualPathRoot).AbsoluteUri;
|
||||
}
|
||||
|
||||
private class AddAuthorizationHeaderParameter : IOperationFilter
|
||||
{
|
||||
public void Apply(Operation operation, SchemaRegistry schemaRegistry, ApiDescription apiDescription)
|
||||
{
|
||||
if (operation.parameters == null)
|
||||
{
|
||||
operation.parameters = new List<Parameter>();
|
||||
}
|
||||
operation.parameters.Add(new Parameter
|
||||
{
|
||||
name = "Authorization",
|
||||
@in = Header,
|
||||
description = "access token",
|
||||
required = false,
|
||||
type = "string"
|
||||
});
|
||||
if (ApiKeyConfiguration.Instance.Enabled)
|
||||
{
|
||||
operation.parameters.Add(new Parameter
|
||||
{
|
||||
name = "ApiKey",
|
||||
@in = Header,
|
||||
description = "Header-ben levő Api kulcs védelem",
|
||||
required = false,
|
||||
type = "string",
|
||||
@default = ApiKeyConfiguration.Instance.ApiKey,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
using System.Web.Http;
|
||||
using Kreta.Core.JsonConverter;
|
||||
using Kreta.Core.ModelBinder;
|
||||
using Kreta.Naplo.Configuration;
|
||||
using Kreta.Naplo.WebApi.FilterAttributes;
|
||||
using Kreta.Web.Logging.Interceptors;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
|
||||
namespace Kreta.Naplo.WebApi
|
||||
{
|
||||
/// <summary>
|
||||
/// Web Api configuration class
|
||||
/// </summary>
|
||||
public static class WebApiConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// Web Api configuration entry
|
||||
/// </summary>
|
||||
/// <param name="config">HttpConfiguration for configuring web Api</param>
|
||||
public static void Register(HttpConfiguration config)
|
||||
{
|
||||
var formatter = GlobalConfiguration.Configuration.Formatters.JsonFormatter;
|
||||
|
||||
formatter.SerializerSettings = new JsonSerializerSettings
|
||||
{
|
||||
Formatting = Formatting.Indented,
|
||||
TypeNameHandling = TypeNameHandling.None
|
||||
};
|
||||
|
||||
formatter.SerializerSettings.Converters.Add(new StringTrimConverter());
|
||||
formatter.SerializerSettings.Converters.Add(new StringEnumConverter());
|
||||
|
||||
config.Filters.Add(new DefaultExceptionFilterAttribute());
|
||||
config.Filters.Add(new ApiKeyAuthorizationAttribute());
|
||||
config.Filters.Add(new IdpAuthorizeAttribute());
|
||||
|
||||
config.MapHttpAttributeRoutes();
|
||||
|
||||
config.MessageHandlers.Add(new ApiLoggingHandler());
|
||||
|
||||
var corsConfiguration = CorsConfiguration.Instance;
|
||||
if (corsConfiguration.IsEnabled)
|
||||
{
|
||||
var cors = new WildcardOriginCorsPolicy(corsConfiguration.Urls, corsConfiguration.Headers, corsConfiguration.Methods)
|
||||
{ SupportsCredentials = corsConfiguration.SupportsCredentials };
|
||||
|
||||
config.EnableCors(cors);
|
||||
}
|
||||
|
||||
config.BindParameter(typeof(string), new StringTrimModelBinder());
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
.swagger-section .swagger-ui-wrap {
|
||||
max-width: 1080px;
|
||||
}
|
72
Kreta.WebApi/Naplo/Kreta.Naplo.WebApi/DependencyContainer.cs
Normal file
72
Kreta.WebApi/Naplo/Kreta.Naplo.WebApi/DependencyContainer.cs
Normal file
|
@ -0,0 +1,72 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using Kreta.Core.IoC;
|
||||
using Kreta.Naplo.BusinessLogic.Propetries;
|
||||
using Kreta.Naplo.Configuration.Kreta;
|
||||
using Kreta.Naplo.Domain;
|
||||
using Kreta.Naplo.Domain.V3.Enum;
|
||||
using Kreta.Naplo.WebApi.V3.Common.Logic;
|
||||
|
||||
namespace Kreta.Naplo.WebApi
|
||||
{
|
||||
/// <summary>
|
||||
/// Dependency resolver of webapi layer
|
||||
/// </summary>
|
||||
internal class DependencyContainer : Core.IoC.DependencyContainer
|
||||
{
|
||||
/// <summary>
|
||||
/// Unknown user agent
|
||||
/// </summary>
|
||||
public const string UnknownUserAgent = "unknown_user_agent";
|
||||
|
||||
/// <summary>
|
||||
/// Instance
|
||||
/// </summary>
|
||||
public static IDependencyResolver Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
return GetResolver(WebApiLayer.Instance);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Imported object resolved
|
||||
/// </summary>
|
||||
/// <param name="importedObject">Imported object</param>
|
||||
protected override void OnImportedObjectResolved(object importedObject)
|
||||
{
|
||||
var service = importedObject as IService;
|
||||
|
||||
if (service != null)
|
||||
{
|
||||
service.Context = new ServiceContext
|
||||
(
|
||||
FelhasznaloLogic.GetInstituteCode(),
|
||||
FelhasznaloLogic.GetInstituteUserId(),
|
||||
FelhasznaloLogic.GetRoles().Contains(FelhasznaloSzerepkor.Tanar) ? new List<string>() { "Teacher" } : new List<string>(),
|
||||
KretaNaploApiConfiguration.Instance.BaseUrl,
|
||||
KretaNaploApiConfiguration.Instance.ApiKey,
|
||||
HttpContext.Current?.Request?.UserAgent ?? UnknownUserAgent,
|
||||
FelhasznaloLogic.GetSchoolYearId()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initialize
|
||||
/// </summary>
|
||||
protected override void Initialize()
|
||||
{
|
||||
#region V2
|
||||
ImportFrom<Domain.V2.Service.ITanarService>(BusinessLogicLayer.Instance);
|
||||
ImportFrom<Domain.V2.Service.IEnumService>(BusinessLogicLayer.Instance);
|
||||
ImportFrom<Domain.V2.Service.ICommonService>(BusinessLogicLayer.Instance);
|
||||
ImportFrom<Domain.V2.Service.IOraService>(BusinessLogicLayer.Instance);
|
||||
ImportFrom<Domain.V2.Service.IErtekelesService>(BusinessLogicLayer.Instance);
|
||||
ImportFrom<Domain.V2.Service.IIskolaorService>(BusinessLogicLayer.Instance);
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Web.Http.Controllers;
|
||||
using System.Web.Http.Filters;
|
||||
using Kreta.Core.Configuratiaton;
|
||||
|
||||
namespace Kreta.Naplo.WebApi.FilterAttributes
|
||||
{
|
||||
internal class ApiKeyAuthorizationAttribute : AuthorizationFilterAttribute, IOverrideFilter
|
||||
{
|
||||
public Type FiltersToOverride => typeof(IAuthorizationFilter);
|
||||
|
||||
public override void OnAuthorization(HttpActionContext actionContext)
|
||||
{
|
||||
if (!AccessGrantedByApiKey(actionContext.Request.Headers))
|
||||
{
|
||||
actionContext.Response = new HttpResponseMessage(HttpStatusCode.Forbidden)
|
||||
{
|
||||
Content = new StringContent("permission_denied")
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
private static bool AccessGrantedByApiKey(HttpRequestHeaders headers)
|
||||
{
|
||||
if (headers is null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(headers));
|
||||
}
|
||||
|
||||
if (ApiKeyConfiguration.Instance.Enabled)
|
||||
{
|
||||
if (headers.TryGetValues(nameof(ApiKeyConfiguration.ApiKey), out var ApiKeys))
|
||||
{
|
||||
string targetApiKey = ApiKeys.FirstOrDefault();
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(targetApiKey) && targetApiKey == ApiKeyConfiguration.Instance.ApiKey)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,133 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Http.Filters;
|
||||
using Kreta.Core;
|
||||
using Kreta.Core.Domain;
|
||||
using Kreta.Core.Enum;
|
||||
using Kreta.Core.Exceptions;
|
||||
using Kreta.Core.Validation.Exceptions;
|
||||
using Kreta.Core.Validation.Extensions;
|
||||
using Kreta.Framework.Entities;
|
||||
using Kreta.Naplo.Dto.V3.Exception;
|
||||
using Kreta.Naplo.WebApi.V3.Common.Logic;
|
||||
using Kreta.Web.Logging.Extensions;
|
||||
using Kreta.Web.Logging.Logger;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Kreta.Naplo.WebApi.FilterAttributes
|
||||
{
|
||||
internal sealed class DefaultExceptionFilterAttribute : ExceptionFilterAttribute
|
||||
{
|
||||
private readonly string _mobileUserLogKey = "MobileUser";
|
||||
|
||||
public override void OnException(HttpActionExecutedContext actionExecutedContext)
|
||||
{
|
||||
if (actionExecutedContext.Request.RequestUri.AbsoluteUri.ToLower().Contains("v2"))
|
||||
{
|
||||
HandleV2Exeption(actionExecutedContext);
|
||||
}
|
||||
else
|
||||
{
|
||||
HandleException(actionExecutedContext);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void HandleException(HttpActionExecutedContext actionExecutedContext)
|
||||
{
|
||||
if (actionExecutedContext.Exception != null)
|
||||
{
|
||||
NaploExceptionResponseDto response;
|
||||
if ((actionExecutedContext.Exception.InnerException ?? actionExecutedContext.Exception) is ValidationException validationException)
|
||||
{
|
||||
const BlExceptionType ResponseExceptionType = BlExceptionType.ModelValidacio;
|
||||
var errorList = validationException.ValidationItems.Select(x => new DetailedErrorItem(x.Id, x.Message, BlExceptionType.ModelValidacio)).ToList();
|
||||
response = new NaploExceptionResponseDto(ResponseExceptionType, ResponseExceptionType.ToDisplayName(), errorList);
|
||||
actionExecutedContext.Response = actionExecutedContext.Request.CreateResponse(HttpStatusCode.BadRequest);
|
||||
actionExecutedContext.Response.Content = SerializeToHttpContent(response);
|
||||
}
|
||||
else if ((actionExecutedContext.Exception.InnerException ?? actionExecutedContext.Exception) is EntityNotFoundException)
|
||||
{
|
||||
const BlExceptionType ResponseExceptionType = BlExceptionType.NemLetezoEntitas;
|
||||
|
||||
response = new NaploExceptionResponseDto(ResponseExceptionType, ResponseExceptionType.ToDisplayName());
|
||||
actionExecutedContext.Response = actionExecutedContext.Request.CreateResponse(HttpStatusCode.NotFound);
|
||||
actionExecutedContext.Response.Content = SerializeToHttpContent(response);
|
||||
}
|
||||
else if ((actionExecutedContext.Exception.InnerException ?? actionExecutedContext.Exception) is BlException blException)
|
||||
{
|
||||
var responseExceptionType = blException.ExceptionType;
|
||||
var responseStatusCode = blException.GetResponseStatusCode();
|
||||
|
||||
if (responseStatusCode == HttpStatusCode.Forbidden && string.IsNullOrEmpty(blException.Message))
|
||||
{
|
||||
actionExecutedContext.Response = actionExecutedContext.Request.CreateResponse(responseStatusCode);
|
||||
actionExecutedContext.Response.Content = new StringContent("permission_denied");
|
||||
return;
|
||||
}
|
||||
|
||||
response = new NaploExceptionResponseDto(responseExceptionType,
|
||||
blException.Message,
|
||||
blException.ErrorList);
|
||||
actionExecutedContext.Response = actionExecutedContext.Request.CreateResponse(responseStatusCode);
|
||||
actionExecutedContext.Response.Content = SerializeToHttpContent(response);
|
||||
}
|
||||
else if ((actionExecutedContext.Exception.InnerException ?? actionExecutedContext.Exception) is OperationCanceledException)
|
||||
{
|
||||
var taskCancelledException = new BlException(BlExceptionType.TaskCancelled.ToDisplayName(), BlExceptionType.TaskCancelled, actionExecutedContext.Exception);
|
||||
|
||||
response = new NaploExceptionResponseDto(taskCancelledException.ExceptionType, taskCancelledException.ExceptionType.ToDisplayName());
|
||||
actionExecutedContext.Response = actionExecutedContext.Request.CreateResponse(taskCancelledException.GetResponseStatusCode());
|
||||
actionExecutedContext.Response.Content = SerializeToHttpContent(response);
|
||||
actionExecutedContext.Exception = taskCancelledException;
|
||||
}
|
||||
else
|
||||
{
|
||||
response = new NaploExceptionResponseDto(BlExceptionType.None, BlExceptionType.None.ToDisplayName());
|
||||
actionExecutedContext.Response = actionExecutedContext.Request.CreateResponse(HttpStatusCode.InternalServerError);
|
||||
actionExecutedContext.Response.Content = SerializeToHttpContent(response);
|
||||
}
|
||||
|
||||
actionExecutedContext.Exception.Data.Add(_mobileUserLogKey, JsonConvert.SerializeObject(FelhasznaloLogic.GetFelhasznalo()));
|
||||
if (!actionExecutedContext.Exception.Data.Contains(RequestResponseLoggingFields.Server.ExceptionId))
|
||||
{
|
||||
actionExecutedContext.Exception.Data.Add(RequestResponseLoggingFields.Server.ExceptionId, response.ExceptionId);
|
||||
}
|
||||
HttpContext.Current.AddException(actionExecutedContext.Exception);
|
||||
}
|
||||
}
|
||||
|
||||
private static void HandleV2Exeption(HttpActionExecutedContext actionExecutedContext)
|
||||
{
|
||||
if (actionExecutedContext.Exception != null)
|
||||
{
|
||||
if (actionExecutedContext.Exception is ValidationException validationException)
|
||||
{
|
||||
actionExecutedContext.Response = actionExecutedContext.Request.CreateResponse(validationException.GetHttpStatusCode(), validationException);
|
||||
}
|
||||
else
|
||||
{
|
||||
Guid exceptionGuid = Guid.NewGuid();
|
||||
|
||||
actionExecutedContext.Response = actionExecutedContext.Request.CreateResponse(HttpStatusCode.InternalServerError);
|
||||
|
||||
actionExecutedContext.Response.Content = SerializeToHttpContent(new { IsException = true, ExceptionId = exceptionGuid, Type = actionExecutedContext.Exception.GetType().Name, actionExecutedContext.Exception.Message });
|
||||
|
||||
if (!actionExecutedContext.Exception.Data.Contains(RequestResponseLoggingFields.Server.ExceptionId))
|
||||
{
|
||||
actionExecutedContext.Exception.Data.Add(RequestResponseLoggingFields.Server.ExceptionId, exceptionGuid);
|
||||
}
|
||||
|
||||
HttpContext.Current.AddException(actionExecutedContext.Exception);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static HttpContent SerializeToHttpContent(object model) => new StringContent(JsonConvert.SerializeObject(model), Encoding.UTF8, "application/json");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,89 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Security.Claims;
|
||||
using System.Security.Principal;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web.Http.Controllers;
|
||||
using System.Web.Http.Filters;
|
||||
using Kreta.Naplo.Domain.V3.Enum;
|
||||
using Kreta.Naplo.WebApi.V3.Common.Logic;
|
||||
|
||||
namespace Kreta.Naplo.WebApi.FilterAttributes
|
||||
{
|
||||
public sealed class IdpAuthorizeAttribute : AuthorizationFilterAttribute, IOverrideFilter
|
||||
{
|
||||
private readonly IEnumerable<FelhasznaloSzerepkor> _permitForRoles;
|
||||
|
||||
public Type FiltersToOverride => typeof(IAuthorizationFilter);
|
||||
|
||||
public IdpAuthorizeAttribute(params FelhasznaloSzerepkor[] permitForRoles)
|
||||
{
|
||||
_permitForRoles = permitForRoles;
|
||||
}
|
||||
|
||||
public override Task OnAuthorizationAsync(HttpActionContext actionContext, CancellationToken cancellationToken)
|
||||
{
|
||||
if (actionContext == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(actionContext));
|
||||
}
|
||||
|
||||
var principal = actionContext.ControllerContext.RequestContext.Principal as ClaimsPrincipal;
|
||||
|
||||
if (!(principal?.Identity?.IsAuthenticated ?? false))
|
||||
{
|
||||
actionContext.Response = new HttpResponseMessage(HttpStatusCode.Unauthorized)
|
||||
{
|
||||
Content = new StringContent("invalid_grant")
|
||||
};
|
||||
return Task.FromResult(0);
|
||||
}
|
||||
|
||||
actionContext.ControllerContext.RequestContext.Principal = new ClaimsPrincipal(new ClaimsIdentity(GetCustomIdentity(), principal.Claims));
|
||||
|
||||
if (_permitForRoles == null || !_permitForRoles.Any())
|
||||
{
|
||||
return Task.FromResult(0);
|
||||
}
|
||||
|
||||
if (HasRole(principal))
|
||||
{
|
||||
return Task.FromResult(0);
|
||||
}
|
||||
|
||||
actionContext.Response = new HttpResponseMessage(HttpStatusCode.Forbidden)
|
||||
{
|
||||
Content = new StringContent("permission_denied")
|
||||
};
|
||||
return Task.FromResult(0);
|
||||
}
|
||||
|
||||
private bool HasRole(IPrincipal principal)
|
||||
{
|
||||
if (principal is ClaimsPrincipal claimsPrincipal)
|
||||
{
|
||||
var roleClaims = claimsPrincipal.Claims.Where(claim => claim.Type == ClaimTypes.Role);
|
||||
|
||||
foreach (var roleClaim in roleClaims)
|
||||
{
|
||||
if (Enum.TryParse(roleClaim.Value, out FelhasznaloSzerepkor role) && _permitForRoles.Contains(role))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private static GenericIdentity GetCustomIdentity()
|
||||
{
|
||||
var user = FelhasznaloLogic.GetFelhasznalo();
|
||||
return new GenericIdentity($"{user.UserIdpUniqueId}/{user.InstituteCode}/{user.UserId}/{user.SchoolYearId}");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
namespace Kreta.Naplo.WebApi.FilterAttributes
|
||||
{
|
||||
public enum MobileUserRoleNaploApi
|
||||
{
|
||||
Student,
|
||||
Tutelary,
|
||||
Teacher
|
||||
}
|
||||
}
|
|
@ -0,0 +1,125 @@
|
|||
using System;
|
||||
using System.Net.Http;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web.Cors;
|
||||
using System.Web.Http.Cors;
|
||||
|
||||
namespace Kreta.Naplo.WebApi.FilterAttributes
|
||||
{
|
||||
public class WildcardOriginCorsPolicy : Attribute, ICorsPolicyProvider
|
||||
{
|
||||
private readonly string _origins;
|
||||
private readonly string _headers;
|
||||
private readonly string _methods;
|
||||
|
||||
//private readonly CorsPolicy _policy;
|
||||
//
|
||||
// Summary:
|
||||
// Initializes a new instance of the WildcardOriginCorsPolicy class.
|
||||
//
|
||||
// Parameters:
|
||||
// origins:
|
||||
// Comma-separated list of origins that are allowed to access the resource. Use
|
||||
// "*" to allow all.
|
||||
// "*.example.com" for subdomains
|
||||
//
|
||||
// headers:
|
||||
// Comma-separated list of headers that are supported by the resource. Use "*" to
|
||||
// allow all. Use null or empty string to allow none.
|
||||
//
|
||||
// methods:
|
||||
// Comma-separated list of methods that are supported by the resource. Use "*" to
|
||||
// allow all. Use null or empty string to allow none.
|
||||
public WildcardOriginCorsPolicy(string origins, string headers, string methods)
|
||||
{
|
||||
this._origins = origins;
|
||||
this._headers = headers;
|
||||
this._methods = methods;
|
||||
}
|
||||
|
||||
public bool SupportsCredentials { get; set; }
|
||||
|
||||
public Task<CorsPolicy> GetCorsPolicyAsync(HttpRequestMessage request, CancellationToken cancellationToken)
|
||||
{
|
||||
var policy = CreatePolicy(request.GetCorsRequestContext(), this._origins, this._headers, this._methods);
|
||||
policy.SupportsCredentials = this.SupportsCredentials;
|
||||
|
||||
return Task.FromResult(policy);
|
||||
}
|
||||
|
||||
private static CorsPolicy CreatePolicy(CorsRequestContext requestContext, string origins, string headers, string methods)
|
||||
{
|
||||
|
||||
var corsPolicy = new CorsPolicy();
|
||||
if (origins == "*")
|
||||
{
|
||||
corsPolicy.AllowAnyOrigin = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
var originsStringArray = origins.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
var requestOrigin = requestContext.Origin.ToLowerInvariant();
|
||||
|
||||
foreach (var originItem in originsStringArray)
|
||||
{
|
||||
////Check if the current request uri matches with any of the wildcard origins.
|
||||
if (Regex.IsMatch(requestOrigin, WildCardToRegularExpression(originItem)))
|
||||
{
|
||||
corsPolicy.Origins.Add(requestOrigin);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(headers))
|
||||
{
|
||||
if (headers == "*")
|
||||
{
|
||||
corsPolicy.AllowAnyHeader = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
var headersStringArray = headers.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
AddCorsPolicyHeaders(corsPolicy, headersStringArray);
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(methods))
|
||||
{
|
||||
if (methods == "*")
|
||||
{
|
||||
corsPolicy.AllowAnyMethod = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
var methodsStringArray = methods.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
AddCorsPolicyMethods(corsPolicy, methodsStringArray);
|
||||
}
|
||||
}
|
||||
|
||||
return corsPolicy;
|
||||
}
|
||||
|
||||
private static void AddCorsPolicyHeaders(CorsPolicy corsPolicy, string[] headersStringArray)
|
||||
{
|
||||
foreach (var originItem in headersStringArray)
|
||||
{
|
||||
corsPolicy.Headers.Add(originItem);
|
||||
}
|
||||
}
|
||||
|
||||
private static void AddCorsPolicyMethods(CorsPolicy corsPolicy, string[] headersStringArray)
|
||||
{
|
||||
foreach (var originItem in headersStringArray)
|
||||
{
|
||||
corsPolicy.Methods.Add(originItem);
|
||||
}
|
||||
}
|
||||
|
||||
private static string WildCardToRegularExpression(String value)
|
||||
{
|
||||
return "^" + Regex.Escape(value).Replace("\\?", ".").Replace("\\*", ".*") + "$";
|
||||
}
|
||||
}
|
||||
}
|
1
Kreta.WebApi/Naplo/Kreta.Naplo.WebApi/Global.asax
Normal file
1
Kreta.WebApi/Naplo/Kreta.Naplo.WebApi/Global.asax
Normal file
|
@ -0,0 +1 @@
|
|||
<%@ Application Codebehind="Global.asax.cs" Inherits="Kreta.Naplo.WebApi.WebApiApplication" Language="C#" %>
|
60
Kreta.WebApi/Naplo/Kreta.Naplo.WebApi/Global.asax.cs
Normal file
60
Kreta.WebApi/Naplo/Kreta.Naplo.WebApi/Global.asax.cs
Normal file
|
@ -0,0 +1,60 @@
|
|||
using System;
|
||||
using System.Configuration;
|
||||
using System.Web;
|
||||
using System.Xml;
|
||||
|
||||
namespace Kreta.Naplo.WebApi
|
||||
{
|
||||
public class WebApiApplication : HttpApplication
|
||||
{
|
||||
private static KretaServer.KretaServer s_kretaServer;
|
||||
|
||||
protected void Application_Start()
|
||||
{
|
||||
ServerStarter();
|
||||
}
|
||||
|
||||
protected void Application_End(object sender, EventArgs e)
|
||||
{
|
||||
if (s_kretaServer != null)
|
||||
{
|
||||
if (s_kretaServer.IsRunning)
|
||||
{
|
||||
s_kretaServer.Stop();
|
||||
}
|
||||
else
|
||||
{
|
||||
#pragma warning disable S2696 // Instance members should not write to "static" fields
|
||||
s_kretaServer = null;
|
||||
#pragma warning restore S2696 // Instance members should not write to "static" fields
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")]
|
||||
private static void ServerStarter()
|
||||
{
|
||||
if (s_kretaServer == null || !s_kretaServer.IsRunning)
|
||||
{
|
||||
XmlNode fullnode = (XmlNode)ConfigurationManager.GetSection("ServerConfig");
|
||||
XmlDocument doc = new XmlDocument();
|
||||
doc.LoadXml(fullnode.SelectSingleNode("/ServerConfig/config").OuterXml);
|
||||
|
||||
s_kretaServer = s_kretaServer ?? new KretaServer.KretaServer(doc.DocumentElement);
|
||||
|
||||
try
|
||||
{
|
||||
s_kretaServer.Start();
|
||||
}
|
||||
#pragma warning disable S2221 // "Exception" should not be caught when not required by called methods
|
||||
catch
|
||||
#pragma warning restore S2221 // "Exception" should not be caught when not required by called methods
|
||||
{
|
||||
#pragma warning disable S3626 // Jump statements should not be redundant
|
||||
return;
|
||||
#pragma warning restore S3626 // Jump statements should not be redundant
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
482
Kreta.WebApi/Naplo/Kreta.Naplo.WebApi/Kreta.Naplo.WebApi.csproj
Normal file
482
Kreta.WebApi/Naplo/Kreta.Naplo.WebApi/Kreta.Naplo.WebApi.csproj
Normal file
|
@ -0,0 +1,482 @@
|
|||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>
|
||||
</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{E63F3D94-368E-4D7B-8980-D22E3E28D357}</ProjectGuid>
|
||||
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Kreta.Naplo.WebApi</RootNamespace>
|
||||
<AssemblyName>Kreta.Naplo.WebApi</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<UseIISExpress>false</UseIISExpress>
|
||||
<Use64BitIISExpress />
|
||||
<IISExpressSSLPort />
|
||||
<IISExpressAnonymousAuthentication />
|
||||
<IISExpressWindowsAuthentication />
|
||||
<IISExpressUseClassicPipelineMode />
|
||||
<UseGlobalApplicationHostFile />
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<DocumentationFile>
|
||||
</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="CacheManager.Core, Version=1.2.0.0, Culture=neutral, PublicKeyToken=5b450b4fb65c4cdb, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\CacheManager.Core.1.2.0\lib\net45\CacheManager.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="CacheManager.StackExchange.Redis, Version=1.2.0.0, Culture=neutral, PublicKeyToken=5b450b4fb65c4cdb, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\CacheManager.StackExchange.Redis.1.2.0\lib\net461\CacheManager.StackExchange.Redis.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="CacheManager.SystemRuntimeCaching, Version=1.2.0.0, Culture=neutral, PublicKeyToken=5b450b4fb65c4cdb, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\CacheManager.SystemRuntimeCaching.1.2.0\lib\net45\CacheManager.SystemRuntimeCaching.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevDefined.OAuth, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a3261f5b4697e67d, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\DevDefined.OAuth.0.2\lib\DevDefined.OAuth.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Easy.Logger, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Easy.Logger.3.2.0\lib\net40\Easy.Logger.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Easy.Logger.Interfaces, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Easy.Logger.Interfaces.1.1.0\lib\net40\Easy.Logger.Interfaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Elasticsearch.Net, Version=7.0.0.0, Culture=neutral, PublicKeyToken=96c599bbe3e70f5d, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Elasticsearch.Net.7.0.0\lib\net461\Elasticsearch.Net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="IdentityModel, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\IdentityModel.1.9.2\lib\net45\IdentityModel.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="IdentityServer3.AccessTokenValidation, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\IdentityServer3.AccessTokenValidation.2.14.0\lib\net45\IdentityServer3.AccessTokenValidation.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Kreta.Core.Configuration, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Kreta.Core.Configuration.1.3.20119.1\lib\net452\Kreta.Core.Configuration.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Kreta.Core.IoC, Version=1.2.63491.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Kreta.Core.IoC.1.2.63491\lib\net452\Kreta.Core.IoC.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Kreta.Core.Validation, Version=2.0.16.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Kreta.Core.Validation.2.0.16\lib\net452\Kreta.Core.Validation.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Kreta.Web.Logging, Version=1.4.5.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Kreta.Web.Logging.1.4.5\lib\net48\Kreta.Web.Logging.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Kreta.Web.Logging.Abstractions, Version=1.0.12.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Kreta.Web.Logging.Abstractions.1.0.12\lib\net48\Kreta.Web.Logging.Abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\log4net.2.0.8\lib\net45-full\log4net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="log4net.ElasticSearch, Version=2.3.6.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\log4net.ElasticSearch.2.3.6\lib\net45\log4net.ElasticSearch.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.Bcl.AsyncInterfaces.1.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="Microsoft.DotNet.PlatformAbstractions, Version=2.0.4.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.DotNet.PlatformAbstractions.2.0.4\lib\net45\Microsoft.DotNet.PlatformAbstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.Extensions.Configuration.2.0.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Configuration.Abstractions, Version=2.0.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.Extensions.Configuration.Abstractions.2.0.1\lib\netstandard2.0\Microsoft.Extensions.Configuration.Abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Configuration.Binder, Version=2.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.Extensions.Configuration.Binder.2.0.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.Binder.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.2.0.0\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.DependencyModel, Version=2.0.4.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.Extensions.DependencyModel.2.0.4\lib\net451\Microsoft.Extensions.DependencyModel.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Options, Version=2.0.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.Extensions.Options.2.0.1\lib\netstandard2.0\Microsoft.Extensions.Options.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Options.ConfigurationExtensions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.Extensions.Options.ConfigurationExtensions.2.0.0\lib\netstandard2.0\Microsoft.Extensions.Options.ConfigurationExtensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Primitives, Version=2.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.Extensions.Primitives.2.0.0\lib\netstandard2.0\Microsoft.Extensions.Primitives.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.IdentityModel.Logging, Version=5.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.IdentityModel.Logging.5.4.0\lib\net461\Microsoft.IdentityModel.Logging.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.IdentityModel.Protocol.Extensions, Version=1.0.2.33, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.IdentityModel.Protocol.Extensions.1.0.2.206221351\lib\net45\Microsoft.IdentityModel.Protocol.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.IdentityModel.Tokens, Version=5.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.IdentityModel.Tokens.5.4.0\lib\net461\Microsoft.IdentityModel.Tokens.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Owin, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.Owin.4.1.0\lib\net45\Microsoft.Owin.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Owin.Cors, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.Owin.Cors.3.1.0\lib\net45\Microsoft.Owin.Cors.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Owin.Host.HttpListener, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.Owin.Host.HttpListener.3.1.0\lib\net45\Microsoft.Owin.Host.HttpListener.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Owin.Host.SystemWeb, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.Owin.Host.SystemWeb.4.1.0\lib\net45\Microsoft.Owin.Host.SystemWeb.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Owin.Hosting, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.Owin.Hosting.3.1.0\lib\net45\Microsoft.Owin.Hosting.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Owin.Security, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.Owin.Security.4.1.0\lib\net45\Microsoft.Owin.Security.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Owin.Security.Jwt, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.Owin.Security.Jwt.3.1.0\lib\net45\Microsoft.Owin.Security.Jwt.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Owin.Security.OAuth, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.Owin.Security.OAuth.3.1.0\lib\net45\Microsoft.Owin.Security.OAuth.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Nexius.Common, Version=18.37.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Nexius.Common.1.0.0.29\lib\Nexius.Common.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Nexius.IdentityProvider.Model, Version=18.29.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Nexius.IdentityProvider.Model.1.0.0.93\lib\Nexius.IdentityProvider.Model.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Owin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f0ebd12fd5e55cc5, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Pipelines.Sockets.Unofficial, Version=1.0.0.0, Culture=neutral, PublicKeyToken=42ea0a778e13fbe2, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Pipelines.Sockets.Unofficial.1.0.7\lib\net472\Pipelines.Sockets.Unofficial.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Serilog, Version=2.0.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Serilog.2.8.0\lib\net46\Serilog.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Serilog.Formatting.Compact, Version=1.0.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Serilog.Formatting.Compact.1.0.0\lib\net45\Serilog.Formatting.Compact.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Serilog.Formatting.Elasticsearch, Version=0.0.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Serilog.Formatting.Elasticsearch.8.0.0\lib\net45\Serilog.Formatting.Elasticsearch.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Serilog.Settings.Configuration, Version=3.1.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Serilog.Settings.Configuration.3.1.0\lib\net461\Serilog.Settings.Configuration.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Serilog.Sinks.Elasticsearch, Version=8.0.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Serilog.Sinks.Elasticsearch.8.0.0\lib\net461\Serilog.Sinks.Elasticsearch.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Serilog.Sinks.File, Version=2.0.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Serilog.Sinks.File.4.0.0\lib\net45\Serilog.Sinks.File.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Serilog.Sinks.PeriodicBatching, Version=2.0.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Serilog.Sinks.PeriodicBatching.2.1.1\lib\net45\Serilog.Sinks.PeriodicBatching.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Serilog.Sinks.RollingFile, Version=2.0.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Serilog.Sinks.RollingFile.3.3.0\lib\net45\Serilog.Sinks.RollingFile.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="SimpleInjector, Version=4.0.11.0, Culture=neutral, PublicKeyToken=984cb50dea722e99, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\SimpleInjector.4.0.11\lib\net45\SimpleInjector.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="SimpleInjector.Integration.WebApi, Version=4.0.11.0, Culture=neutral, PublicKeyToken=984cb50dea722e99, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\SimpleInjector.Integration.WebApi.4.0.11\lib\net45\SimpleInjector.Integration.WebApi.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="StackExchange.Redis, Version=2.0.0.0, Culture=neutral, PublicKeyToken=c219ff1ca8c2ce46, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\StackExchange.Redis.2.0.513\lib\net472\StackExchange.Redis.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Swashbuckle.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cd1bb07a5ac7c7bc, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Swashbuckle.Core.5.6.0\lib\net40\Swashbuckle.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Swashbuckle.Examples, Version=3.12.0.0, Culture=neutral, PublicKeyToken=aa1e9c5053bfbe95, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Swashbuckle.Examples.3.12.0\lib\net40\Swashbuckle.Examples.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\System.Buffers.4.5.0\lib\netstandard2.0\System.Buffers.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.ComponentModel.Composition" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Diagnostics.DiagnosticSource, Version=4.0.3.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\System.Diagnostics.DiagnosticSource.4.5.1\lib\net46\System.Diagnostics.DiagnosticSource.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Diagnostics.PerformanceCounter, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\System.Diagnostics.PerformanceCounter.4.5.0\lib\net461\System.Diagnostics.PerformanceCounter.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.IdentityModel" />
|
||||
<Reference Include="System.IdentityModel.Tokens.Jwt, Version=4.0.20622.1351, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\System.IdentityModel.Tokens.Jwt.4.0.2.206221351\lib\net45\System.IdentityModel.Tokens.Jwt.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.IO, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\System.IO.4.3.0\lib\net462\System.IO.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.IO.Compression, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\System.IO.Compression.4.3.0\lib\net46\System.IO.Compression.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.IO.Pipelines, Version=4.0.2.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\System.IO.Pipelines.4.7.1\lib\netstandard2.0\System.IO.Pipelines.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\System.Memory.4.5.3\lib\netstandard2.0\System.Memory.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Net" />
|
||||
<Reference Include="System.Net.Http, Version=4.1.1.3, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\System.Net.Http.4.3.4\lib\net46\System.Net.Http.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Net.Http.Formatting, Version=5.2.6.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.AspNet.WebApi.Client.5.2.6\lib\net45\System.Net.Http.Formatting.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Numerics" />
|
||||
<Reference Include="System.Numerics.Vectors, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\System.Numerics.Vectors.4.4.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\System.Runtime.4.3.0\lib\net462\System.Runtime.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.Caching" />
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\System.Runtime.CompilerServices.Unsafe.4.5.3\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.Serialization" />
|
||||
<Reference Include="System.Security" />
|
||||
<Reference Include="System.Security.Cryptography.Algorithms, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\System.Security.Cryptography.Algorithms.4.3.1\lib\net463\System.Security.Cryptography.Algorithms.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Security.Cryptography.Encoding, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Security.Cryptography.Primitives, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Security.Cryptography.X509Certificates, Version=4.1.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\System.Security.Cryptography.X509Certificates.4.3.2\lib\net461\System.Security.Cryptography.X509Certificates.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Threading.Channels, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\System.Threading.Channels.4.7.1\lib\net461\System.Threading.Channels.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Cors, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.AspNet.Cors.5.0.0\lib\net45\System.Web.Cors.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.DynamicData" />
|
||||
<Reference Include="System.Web.Entity" />
|
||||
<Reference Include="System.Web.ApplicationServices" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Web.Extensions" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Web.Http, Version=5.2.6.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.AspNet.WebApi.Core.5.2.6\lib\net45\System.Web.Http.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Http.Cors, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.AspNet.WebApi.Cors.5.0.0\lib\net45\System.Web.Http.Cors.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Http.Owin, Version=5.2.6.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.AspNet.WebApi.Owin.5.2.6\lib\net45\System.Web.Http.Owin.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Http.WebHost, Version=5.2.6.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.AspNet.WebApi.WebHost.5.2.6\lib\net45\System.Web.Http.WebHost.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Web.Services" />
|
||||
<Reference Include="System.EnterpriseServices" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="WebActivatorEx, Version=2.0.0.0, Culture=neutral, PublicKeyToken=7b26dc2a43f6a0d4, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\WebActivatorEx.2.2.0\lib\net40\WebActivatorEx.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="App_Data\Kreta.Naplo.Dto.XML" />
|
||||
<Content Include="App_Data\Kreta.Naplo.WebApi.XML" />
|
||||
<EmbeddedResource Include="Content\naplo-swagger-ui-custom.css" />
|
||||
<Content Include="Global.asax" />
|
||||
<Content Include="Web.config">
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\..\..\Tools\SharedAssemblyInfo.cs">
|
||||
<Link>Properties\SharedAssemblyInfo.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="App_Start\SwaggerConfig.cs" />
|
||||
<Compile Include="App_Start\WebApiConfig.cs" />
|
||||
<Compile Include="DependencyContainer.cs" />
|
||||
<Compile Include="FilterAttributes\ApiKeyAuthorizationAttribute.cs" />
|
||||
<Compile Include="FilterAttributes\DefaultExceptionFilterAtribute.cs" />
|
||||
<Compile Include="FilterAttributes\IdpAuthorizeAttribute.cs" />
|
||||
<Compile Include="FilterAttributes\MobileUserRoleNaploApi.cs" />
|
||||
<Compile Include="Global.asax.cs">
|
||||
<DependentUpon>Global.asax</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Startup.cs" />
|
||||
<Compile Include="V2\Controllers\TestV2Controller.cs" />
|
||||
<Compile Include="V2\VersionedRouteInfo.cs" />
|
||||
<Compile Include="Properties\WebApiLayer.cs" />
|
||||
<Compile Include="FilterAttributes\WildcardOriginCorsPolicy.cs" />
|
||||
<Compile Include="V3\Common\Logic\FelhasznaloLogic.cs" />
|
||||
<Compile Include="V3\Constants.cs" />
|
||||
<Compile Include="V3\Controllers\DummyController.cs" />
|
||||
<Compile Include="V3\Controllers\EnumController.cs" />
|
||||
<Compile Include="V3\Controllers\IgazolasController.cs" />
|
||||
<Compile Include="V3\Controllers\IskolaorController.cs" />
|
||||
<Compile Include="V3\Controllers\OraController.cs" />
|
||||
<Compile Include="V3\Controllers\OrarendController.cs" />
|
||||
<Compile Include="V3\Controllers\HaziFeladatController.cs" />
|
||||
<Compile Include="V3\Controllers\OsztalyCsoportController.cs" />
|
||||
<Compile Include="V3\Controllers\TanarController.cs" />
|
||||
<Compile Include="V3\Controllers\TanmenetController.cs" />
|
||||
<Compile Include="V3\Documentation\AMuveletNemVegezhetoElTobbszorExample.cs" />
|
||||
<Compile Include="V3\Documentation\DescriptionLookUp.cs" />
|
||||
<Compile Include="V3\Documentation\DummyExampleProvider.cs" />
|
||||
<Compile Include="V3\Documentation\DummyListExampleProvider.cs" />
|
||||
<Compile Include="V3\Documentation\Helper\ExampleHelper.cs" />
|
||||
<Compile Include="V3\Documentation\IntezmenyMarTanevetValtottExample.cs" />
|
||||
<Compile Include="V3\Documentation\IsmeretlenHibaExample.cs" />
|
||||
<Compile Include="V3\Documentation\JogosulatlanExample.cs" />
|
||||
<Compile Include="V3\Documentation\LejartTokenExample.cs" />
|
||||
<Compile Include="V3\Documentation\MockServices\CoreApiClientMock.cs" />
|
||||
<Compile Include="V3\Documentation\MockServices\FileServiceHelperMock.cs" />
|
||||
<Compile Include="V3\Documentation\NemLetezoEntitasExample.cs" />
|
||||
<Compile Include="V3\Documentation\PermissionDeniedExample.cs" />
|
||||
<Compile Include="V3\Documentation\TimeOutExample.cs" />
|
||||
<Compile Include="V3\Documentation\ValidaciosHibaExample.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="..\..\..\KretaWeb\Resources\StringResources.kres">
|
||||
<Link>StringResources.kres</Link>
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="App_Data\IntezmenyConnectionString.json" />
|
||||
<None Include="packages.config" />
|
||||
<None Include="Web.Debug.config">
|
||||
<DependentUpon>Web.config</DependentUpon>
|
||||
</None>
|
||||
<None Include="Web.Release.config">
|
||||
<DependentUpon>Web.config</DependentUpon>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\Framework\Kreta.Framework.csproj">
|
||||
<Project>{320EF478-7155-441D-B1E9-47EC3E57FB45}</Project>
|
||||
<Name>Kreta.Framework</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\Kreta.BusinessLogic\Kreta.BusinessLogic.csproj">
|
||||
<Project>{8876FE0D-841E-422D-A5A0-59239CD98482}</Project>
|
||||
<Name>Kreta.BusinessLogic</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\Kreta.Client\Kreta.Client.csproj">
|
||||
<Project>{4B28E52B-B531-403C-A827-2CC178FF8A4F}</Project>
|
||||
<Name>Kreta.Client</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\Kreta.Core\Kreta.Core.csproj">
|
||||
<Project>{57418d3e-caf1-482c-9b18-85d147abd495}</Project>
|
||||
<Name>Kreta.Core</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\Kreta.KretaServer\Kreta.KretaServer.csproj">
|
||||
<Project>{62EB8504-1C3A-4DB1-AB86-F96B2341E201}</Project>
|
||||
<Name>Kreta.KretaServer</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Kreta.Naplo.BusinessLogic\Kreta.Naplo.BusinessLogic.csproj">
|
||||
<Project>{EB1FB976-86F1-497F-A854-3B7C56F3C2D5}</Project>
|
||||
<Name>Kreta.Naplo.BusinessLogic</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Kreta.Naplo.Configuration\Kreta.Naplo.Configuration.csproj">
|
||||
<Project>{521A86F6-B3BE-47FF-9A91-7E21DC0CDB43}</Project>
|
||||
<Name>Kreta.Naplo.Configuration</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Kreta.Naplo.Domain\Kreta.Naplo.Domain.csproj">
|
||||
<Project>{9BFF7535-E0F6-4437-AF5F-540E1B4506B2}</Project>
|
||||
<Name>Kreta.Naplo.Domain</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Kreta.Naplo.Dto\Kreta.Naplo.Dto.csproj">
|
||||
<Project>{5F37B7BC-725E-4D89-A813-06AF64A9FCCD}</Project>
|
||||
<Name>Kreta.Naplo.Dto</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Kreta.Naplo.Infrastrucure\Kreta.Naplo.Infrastrucure.csproj">
|
||||
<Project>{120e1b9d-daf1-4e96-a04e-9ac1dc551e8b}</Project>
|
||||
<Name>Kreta.Naplo.Infrastrucure</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
|
||||
<ProjectExtensions>
|
||||
<VisualStudio>
|
||||
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
|
||||
<WebProjectProperties>
|
||||
<UseIIS>True</UseIIS>
|
||||
<AutoAssignPort>True</AutoAssignPort>
|
||||
<DevelopmentServerPort>38017</DevelopmentServerPort>
|
||||
<DevelopmentServerVPath>/</DevelopmentServerVPath>
|
||||
<IISUrl>https://biatorbagyi.ekreta.hu/naplo</IISUrl>
|
||||
<NTLMAuthentication>False</NTLMAuthentication>
|
||||
<UseCustomServer>False</UseCustomServer>
|
||||
<CustomServerUrl>
|
||||
</CustomServerUrl>
|
||||
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
|
||||
</WebProjectProperties>
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
</Target>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
|
@ -0,0 +1 @@
|
|||
|
|
@ -0,0 +1,32 @@
|
|||
using System;
|
||||
using Kreta.Core.IoC;
|
||||
|
||||
namespace Kreta.Naplo.WebApi
|
||||
{
|
||||
/// <summary>
|
||||
/// Business logic layer
|
||||
/// </summary>
|
||||
public class WebApiLayer : ApplicationLayer
|
||||
{
|
||||
/// <summary>
|
||||
/// Instance
|
||||
/// </summary>
|
||||
static Lazy<WebApiLayer> instance;
|
||||
|
||||
/// <summary>
|
||||
/// Instance
|
||||
/// </summary>
|
||||
public static WebApiLayer Instance
|
||||
{
|
||||
get { return instance.Value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Static constructor
|
||||
/// </summary>
|
||||
static WebApiLayer()
|
||||
{
|
||||
instance = new Lazy<WebApiLayer>();
|
||||
}
|
||||
}
|
||||
}
|
43
Kreta.WebApi/Naplo/Kreta.Naplo.WebApi/Startup.cs
Normal file
43
Kreta.WebApi/Naplo/Kreta.Naplo.WebApi/Startup.cs
Normal file
|
@ -0,0 +1,43 @@
|
|||
using System.Configuration;
|
||||
using System.Web;
|
||||
using IdentityServer3.AccessTokenValidation;
|
||||
using Kreta.BusinessLogic;
|
||||
using Kreta.Naplo.WebApi;
|
||||
using Kreta.Web.Logging.Logger;
|
||||
using Microsoft.Owin;
|
||||
using Owin;
|
||||
using SimpleInjector;
|
||||
using SimpleInjector.Integration.WebApi;
|
||||
using SimpleInjector.Lifestyles;
|
||||
using HttpGlobalConfiguration = System.Web.Http.GlobalConfiguration;
|
||||
|
||||
[assembly: OwinStartup(typeof(Startup))]
|
||||
namespace Kreta.Naplo.WebApi
|
||||
{
|
||||
public static class Startup
|
||||
{
|
||||
public static void Configuration(IAppBuilder appBuilder)
|
||||
{
|
||||
HttpGlobalConfiguration.Configure(WebApiConfig.Register);
|
||||
|
||||
log4net.Config.XmlConfigurator.Configure();
|
||||
|
||||
var container = new Container();
|
||||
container.Options.DefaultScopedLifestyle = new AsyncScopedLifestyle();
|
||||
container.InjectNaploMobileBusinessLogic();
|
||||
container.Register(() => TraceLoggerFactory.Create(HttpContext.Current), Lifestyle.Scoped);
|
||||
container.RegisterWebApiControllers(HttpGlobalConfiguration.Configuration);
|
||||
container.Verify();
|
||||
HttpGlobalConfiguration.Configuration.DependencyResolver = new SimpleInjectorWebApiDependencyResolver(container);
|
||||
|
||||
appBuilder.UseIdentityServerBearerTokenAuthentication(
|
||||
new IdentityServerBearerTokenAuthenticationOptions
|
||||
{
|
||||
ValidationMode = ValidationMode.Local,
|
||||
Authority = ConfigurationManager.AppSettings["idp:Authority"],
|
||||
RequiredScopes = ConfigurationManager.AppSettings["idp:RequiredScopes"].Split(';')
|
||||
})
|
||||
.UseWebApi(HttpGlobalConfiguration.Configuration);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,154 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web.Http;
|
||||
using System.Web.Http.Description;
|
||||
using Kreta.Naplo.Domain.V2.Model;
|
||||
using Kreta.Naplo.Domain.V2.Model.CustomEnum;
|
||||
using Kreta.Naplo.Domain.V2.Model.Get.Enum;
|
||||
using Kreta.Naplo.Domain.V2.Model.Get.OpenBoard;
|
||||
using Kreta.Naplo.Domain.V2.Model.Get.Ora.JavasoltJelenletTemplate;
|
||||
using Kreta.Naplo.Domain.V2.Model.Get.Orarend;
|
||||
using Kreta.Naplo.Domain.V2.Model.Get.Tanar;
|
||||
using Kreta.Naplo.Domain.V2.Model.Get.Tanmenet;
|
||||
using Kreta.Naplo.Domain.V2.Model.Get.Tanulo;
|
||||
using Kreta.Naplo.Domain.V2.Model.Post.Ertekeles;
|
||||
using Kreta.Naplo.Domain.V2.Model.Post.Naplozas;
|
||||
using Kreta.Naplo.Domain.V2.Model.Post.OpenBoard;
|
||||
using Kreta.Naplo.Domain.V2.Service;
|
||||
using Kreta.Naplo.Domain.V3.Enum;
|
||||
using Kreta.Naplo.Infrastructure;
|
||||
using Kreta.Naplo.WebApi.FilterAttributes;
|
||||
using OrarendiOra = Kreta.Naplo.Domain.V2.Model.Get.Ora.OrarendiOra.JavasoltJelenlet;
|
||||
using TanitasiOra = Kreta.Naplo.Domain.V2.Model.Get.Ora.TanitasiOra.JavasoltJelenlet;
|
||||
|
||||
namespace Kreta.Naplo.WebApi.V2.Controllers
|
||||
{
|
||||
[ApiKeyAuthorization]
|
||||
[IdpAuthorize(FelhasznaloSzerepkor.Tanar)]
|
||||
public partial class TestV2Controller : ApiController
|
||||
{
|
||||
/// <summary>
|
||||
/// Tanár profil
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
[Route(VersionedRouteInfo.RoutePrefix + "/Tanar/Profil")]
|
||||
[ResponseType(typeof(ResponseWrapper<ProfilResponse>))]
|
||||
[HttpGet]
|
||||
public async Task<ResponseWrapper<ProfilResponse>> ProfilAsync([FromUri(Name = Constants.EmptyString)] ProfilRequest request)
|
||||
=> await DependencyContainer.Instance.GetInstance<ITanarService>().GetProfilAsync(request);
|
||||
|
||||
/// <summary>
|
||||
/// Iskolaőr profil
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
[Route(VersionedRouteInfo.RoutePrefix + "/Iskolaor")]
|
||||
[ResponseType(typeof(ResponseWrapper<List<IskolaorResponse>>))]
|
||||
[HttpGet]
|
||||
public async Task<ResponseWrapper<List<IskolaorResponse>>> IskolaorAsync([FromUri(Name = Constants.EmptyString)] IskolaorRequest request)
|
||||
=> await DependencyContainer.Instance.GetInstance<IIskolaorService>().GetIskolaorAsync(request);
|
||||
|
||||
/// <summary>
|
||||
/// Óra lista
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
[Route(VersionedRouteInfo.RoutePrefix + "/Orarend/OraLista")]
|
||||
[ResponseType(typeof(ResponseWrapper<List<OraGetResponse>>))]
|
||||
[HttpGet]
|
||||
public async Task<ResponseWrapper<List<OraGetResponse>>> OraListaAsync([FromUri(Name = Constants.EmptyString)] OraGetRequest request)
|
||||
=> await DependencyContainer.Instance.GetInstance<ICommonService>().GetOraListaAsync(request);
|
||||
|
||||
/// <summary>
|
||||
/// Naplózás
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
[Route(VersionedRouteInfo.RoutePrefix + "/Orarend/OraNaplozas")]
|
||||
[ResponseType(typeof(List<OraNaplozasResponse>))]
|
||||
[HttpPost]
|
||||
public async Task<List<OraNaplozasResponse>> OraNaplozasAsync(List<OraNaplozasRequest> request)
|
||||
=> await DependencyContainer.Instance.GetInstance<ICommonService>().OraNaplozasAsync(request);
|
||||
|
||||
/// <summary>
|
||||
/// Osztály tanuló lista
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
[Route(VersionedRouteInfo.RoutePrefix + "/Ora/OsztalyTanuloi")]
|
||||
[ResponseType(typeof(ResponseWrapper<OsztalyTanuloiResponse>))]
|
||||
[HttpGet]
|
||||
public async Task<ResponseWrapper<OsztalyTanuloiResponse>> OsztalyTanuloiAsync([FromUri(Name = Constants.EmptyString)] OsztalyTanuloiRequest request)
|
||||
=> await DependencyContainer.Instance.GetInstance<IOraService>().GetOsztalyTanuloiAsync(request);
|
||||
|
||||
/// <summary>
|
||||
/// Tanuló mulasztás lista
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
[Route(VersionedRouteInfo.RoutePrefix + "/Ora/Mulasztas")]
|
||||
[ResponseType(typeof(ResponseWrapper<List<MulasztasResponse>>))]
|
||||
[HttpGet]
|
||||
public async Task<ResponseWrapper<List<MulasztasResponse>>> MulasztasAsync([FromUri(Name = Constants.EmptyString)] MulasztasRequest request)
|
||||
=> await DependencyContainer.Instance.GetInstance<IOraService>().GetMulasztasAsync(request);
|
||||
|
||||
/// <summary>
|
||||
/// Tanuló feljegyzés lista
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
[Route(VersionedRouteInfo.RoutePrefix + "/Ora/Feljegyzes")]
|
||||
[ResponseType(typeof(ResponseWrapper<List<FeljegyzesResponse>>))]
|
||||
[HttpGet]
|
||||
public async Task<ResponseWrapper<List<FeljegyzesResponse>>> FeljegyzesAsync([FromUri(Name = Constants.EmptyString)] FeljegyzesRequest request)
|
||||
=> await DependencyContainer.Instance.GetInstance<IOraService>().GetFeljegyzesAsync(request);
|
||||
|
||||
/// <summary>
|
||||
/// Naplo Enum
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
[Route(VersionedRouteInfo.RoutePrefix + "/Enum/NaploEnum")]
|
||||
[ResponseType(typeof(ResponseWrapper<List<NaploEnumListItem>>))]
|
||||
[HttpGet]
|
||||
public async Task<ResponseWrapper<List<NaploEnumListItem>>> NaploEnumAsync([FromUri(Name = Constants.EmptyString)] Domain.V2.Model.Get.Enum.EnumRequest request)
|
||||
=> await DependencyContainer.Instance.GetInstance<IEnumService>().GetNaploEnumAsync(request);
|
||||
|
||||
[Route(VersionedRouteInfo.RoutePrefix + "/Ertekeles/OsztalyCsoportErtekeles")]
|
||||
[ResponseType(typeof(List<ErtekelesResponse>))]
|
||||
[HttpPost]
|
||||
public async Task<List<ErtekelesResponse>> OsztalyCsoportErtekelesAsync(List<OsztalyCsoportErtekelesRequest> request)
|
||||
=> await DependencyContainer.Instance.GetInstance<IErtekelesService>().PostOsztalyCsoportErtekelesAsync(request);
|
||||
|
||||
[HttpGet, Route(VersionedRouteInfo.RoutePrefix + "/Tanmenet")]
|
||||
public async Task<List<object>> TanmenetListaAsync([FromUri] TanmenetGetRequest request)
|
||||
=> await DependencyContainer.Instance.GetInstance<ICommonService>().ListTanmenetAsync(request);
|
||||
|
||||
[HttpGet, Route(VersionedRouteInfo.RoutePrefix + "/Ora/OrarendiOra/JavasoltJelenlet")]
|
||||
public async Task<List<object>> ListJavasoltJelenletAsync([FromUri] OrarendiOra.JavasoltJelenletGetRequest request)
|
||||
=> await DependencyContainer.Instance.GetInstance<ICommonService>().ListJavasoltJelenletAsync(request);
|
||||
|
||||
[HttpGet, Route(VersionedRouteInfo.RoutePrefix + "/Ora/TanitasiOra/JavasoltJelenlet")]
|
||||
public async Task<List<object>> ListJavasoltJelenletAsync([FromUri] TanitasiOra.JavasoltJelenletGetRequest request)
|
||||
=> await DependencyContainer.Instance.GetInstance<ICommonService>().ListJavasoltJelenletAsync(request);
|
||||
|
||||
[HttpGet, Route(VersionedRouteInfo.RoutePrefix + "/Ora/JavasoltJelenletTemplate")]
|
||||
public async Task<ResponseWrapper<List<object>>> ListJavasoltJelenletTemplateAsync([FromUri] JavasoltJelenletTemplateGetRequest request)
|
||||
=> await DependencyContainer.Instance.GetInstance<ICommonService>().ListJavasoltJelenletTemplateAsync(request);
|
||||
|
||||
[Route(VersionedRouteInfo.RoutePrefix + "/OpenBoard/FajlFeltoltes")]
|
||||
[ResponseType(typeof(FeltoltottFajlResponse))]
|
||||
[HttpPost]
|
||||
public async Task<FeltoltottFajlResponse> FajlFeltoltesAsync(FeltoltottFajlRequest request)
|
||||
=> await DependencyContainer.Instance.GetInstance<ICommonService>().PostFajlFeltoltesAsync(request);
|
||||
|
||||
[HttpGet, Route(VersionedRouteInfo.RoutePrefix + "/OpenBoard/FeltolthetoFajlokSzama")]
|
||||
public async Task<FeltolthetoFajlokSzamaResponse> FeltolthetoFajlokSzamaAsync([FromUri] FeltolthetoFajlokSzamaRequest request)
|
||||
=> await DependencyContainer.Instance.GetInstance<ICommonService>().GetFeltolthetoFajlokSzamaAsync(request);
|
||||
|
||||
[HttpGet, Route(VersionedRouteInfo.RoutePrefix + "/Tanulo/Ertekeles")]
|
||||
public async Task<List<ErtekelesGetResponse>> GetTanuloErtekeleseiAsync([FromUri] ErtekelesGetRequest request)
|
||||
=> await DependencyContainer.Instance.GetInstance<ICommonService>().GetTanuloErtekeleseiAsync(request);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
namespace Kreta.Naplo.WebApi.V2
|
||||
{
|
||||
/// <summary>
|
||||
/// Versioned route info
|
||||
/// </summary>
|
||||
static class VersionedRouteInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Reoute prefix
|
||||
/// </summary>
|
||||
public const string RoutePrefix = "V2";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Security.Claims;
|
||||
using System.Web;
|
||||
using Kreta.Naplo.Domain.V3.Common;
|
||||
using Kreta.Naplo.Domain.V3.Enum;
|
||||
|
||||
namespace Kreta.Naplo.WebApi.V3.Common.Logic
|
||||
{
|
||||
internal static class FelhasznaloLogic
|
||||
{
|
||||
public static MobileUser GetFelhasznalo()
|
||||
{
|
||||
return HttpContext.Current.Items.Contains("MobileUser")
|
||||
? (MobileUser)HttpContext.Current.Items["MobileUser"]
|
||||
: new MobileUser(GetInstituteCode(), GetInstituteUserId(), GetUserName(), GetRoles(), GetSchoolYearId(), GetUserIdpUniqueId(), GetInstituteUniqueId());
|
||||
}
|
||||
|
||||
public static string GetInstituteCode()
|
||||
{
|
||||
return GetClaims("kreta:institute_code").Single();
|
||||
}
|
||||
|
||||
private static Guid GetInstituteUniqueId()
|
||||
{
|
||||
return new Guid(GetClaims("kreta:institute_unique_id").Single());
|
||||
}
|
||||
|
||||
public static int GetInstituteUserId()
|
||||
{
|
||||
var claim = GetClaims("kreta:institute_user_id").Single();
|
||||
return int.Parse(claim);
|
||||
}
|
||||
|
||||
public static int GetSchoolYearId()
|
||||
{
|
||||
var claim = GetClaims("kreta:school_year_id").Single();
|
||||
return int.Parse(claim);
|
||||
}
|
||||
|
||||
private static Guid GetUserIdpUniqueId()
|
||||
{
|
||||
return new Guid(GetClaims("kreta:institute_user_idp_unique_id").Single());
|
||||
}
|
||||
|
||||
private static string GetUserName()
|
||||
{
|
||||
return GetClaims("kreta:user_name").Single();
|
||||
}
|
||||
|
||||
public static IEnumerable<FelhasznaloSzerepkor> GetRoles()
|
||||
{
|
||||
var roles = GetClaims(ClaimTypes.Role);
|
||||
foreach (var role in roles)
|
||||
{
|
||||
if (Enum.TryParse(role, out FelhasznaloSzerepkor enumValue))
|
||||
{
|
||||
yield return enumValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static IEnumerable<string> GetClaims(string type)
|
||||
{
|
||||
return ClaimsPrincipal.Current.Claims.Where(x => x.Type == type).Select(x => x.Value);
|
||||
}
|
||||
}
|
||||
}
|
7
Kreta.WebApi/Naplo/Kreta.Naplo.WebApi/V3/Constants.cs
Normal file
7
Kreta.WebApi/Naplo/Kreta.Naplo.WebApi/V3/Constants.cs
Normal file
|
@ -0,0 +1,7 @@
|
|||
namespace Kreta.Naplo.WebApi.V3
|
||||
{
|
||||
internal static class Constants
|
||||
{
|
||||
public const string RoutePrefix = "V3";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Web.Http;
|
||||
using Kreta.Naplo.BusinessLogic.V3.Dummy;
|
||||
using Kreta.Naplo.Domain.V3.Enum;
|
||||
using Kreta.Naplo.WebApi.FilterAttributes;
|
||||
using Kreta.Naplo.WebApi.V3.Common.Logic;
|
||||
using Kreta.Naplo.WebApi.V3.Documentation;
|
||||
using Kreta.Web.Logging.Abstractions;
|
||||
using Swashbuckle.Swagger.Annotations;
|
||||
|
||||
namespace Kreta.Naplo.WebApi.V3.Controllers
|
||||
{
|
||||
[ApiKeyAuthorization]
|
||||
[IdpAuthorize(FelhasznaloSzerepkor.Tanar)]
|
||||
[RoutePrefix(Constants.RoutePrefix + "/Dummy")]
|
||||
public class DummyController : ApiController
|
||||
{
|
||||
private ITraceLogger TraceLogger { get; }
|
||||
|
||||
public DummyController(ITraceLogger traceLogger)
|
||||
{
|
||||
TraceLogger = traceLogger ?? throw new ArgumentNullException(nameof(traceLogger));
|
||||
}
|
||||
|
||||
[HttpGet, Route("TraceLoggerDummy")]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.TraceDummyResponseLeiras, typeof(List<object>))]
|
||||
public List<object> TraceLoggerDummy()
|
||||
{
|
||||
return ((DummyFacade)Activator.CreateInstance(typeof(DummyFacade), FelhasznaloLogic.GetFelhasznalo(), TraceLogger)).TraceLoggerDummy();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Web.Http;
|
||||
using Kreta.Naplo.BusinessLogic.V3.Enum;
|
||||
using Kreta.Naplo.Domain.V3.Enum;
|
||||
using Kreta.Naplo.Dto.V3.Enum;
|
||||
using Kreta.Naplo.Dto.V3.Exception;
|
||||
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 + "/Enum")]
|
||||
[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 EnumController : ApiController
|
||||
{
|
||||
[HttpGet, Route("NaploEnum")]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.EnumResponseLeiras, typeof(EnumResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.OK, typeof(DummyExampleProvider<EnumController, EnumResponseDto>))]
|
||||
public List<EnumResponseDto> GetNaploEnum([FromUri] EnumRequestDto request)
|
||||
{
|
||||
return ModelToDto(((EnumFacade)Activator.CreateInstance(typeof(EnumFacade), FelhasznaloLogic.GetFelhasznalo())).GetNaploEnum(request));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,102 @@
|
|||
using System;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Web.Http;
|
||||
using Kreta.BusinessLogic.Interfaces;
|
||||
using Kreta.Client.CoreApi;
|
||||
using Kreta.Naplo.BusinessLogic.V3.HaziFeladat;
|
||||
using Kreta.Naplo.Domain.V3.Enum;
|
||||
using Kreta.Naplo.Dto.V3.Exception;
|
||||
using Kreta.Naplo.Dto.V3.HaziFeladat;
|
||||
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;
|
||||
|
||||
namespace Kreta.Naplo.WebApi.V3.Controllers
|
||||
{
|
||||
[ApiKeyAuthorization]
|
||||
[IdpAuthorize(FelhasznaloSzerepkor.Tanar)]
|
||||
[RoutePrefix(Constants.RoutePrefix)]
|
||||
[SwaggerResponse(HttpStatusCode.NotFound, DescriptionLookUp.NemLetezoEntitasResponseLeiras, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.NotFound, typeof(NemLetezoEntitasExample))]
|
||||
[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 HaziFeladatController : ApiController
|
||||
{
|
||||
private readonly IFileServiceHelper _fileServiceHelper;
|
||||
|
||||
private readonly ICoreApiClient _coreApiClient;
|
||||
|
||||
public HaziFeladatController(IFileServiceHelper fileServiceHelper, ICoreApiClient coreApiClient)
|
||||
{
|
||||
_fileServiceHelper = fileServiceHelper ?? throw new ArgumentNullException(nameof(fileServiceHelper));
|
||||
_coreApiClient = coreApiClient ?? throw new ArgumentNullException(nameof(coreApiClient));
|
||||
}
|
||||
|
||||
[HttpGet, Route("HaziFeladat/{id}")]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.ListaUidVagyUidsFilterResponseLeiras, typeof(HaziFeladatResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.OK, typeof(DummyExampleProviderWithDependencyInjection<HaziFeladatController, HaziFeladatResponseDto>))]
|
||||
public HaziFeladatResponseDto GetHaziFeladat(int id)
|
||||
{
|
||||
return ((HaziFeladatFacade)Activator.CreateInstance(typeof(HaziFeladatFacade), FelhasznaloLogic.GetFelhasznalo())).GetHaziFeladat(id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Házi feladat rögzítése
|
||||
/// </summary>
|
||||
[HttpPost, Route("HaziFeladat")]
|
||||
[SwaggerResponse(HttpStatusCode.NotFound, DescriptionLookUp.NemLetezoEntitasResponseLeiras + DescriptionLookUp.HaziFeladatRogziteseSikertelenAzOraMarNemLetezikAKivalasztottNapon, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.NotFound, typeof(NemLetezoEntitasExample))]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.HaziFeladatMenteseSikeres, typeof(int))]
|
||||
public int SaveHaziFeladat(HaziFeladatCreateRequestDto request)
|
||||
{
|
||||
return ((HaziFeladatFacade)Activator.CreateInstance(typeof(HaziFeladatFacade), FelhasznaloLogic.GetFelhasznalo(), _fileServiceHelper, _coreApiClient)).SaveHaziFeladat(request);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Házi feladat módosítása
|
||||
/// </summary>
|
||||
[HttpPut, Route("HaziFeladat/{id}")]
|
||||
[SwaggerResponse(HttpStatusCode.NotFound, DescriptionLookUp.NemLetezoEntitasResponseLeiras + DescriptionLookUp.HaziFeladatModositasaSikertelenAHaziFeladatNemLetezik, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.NotFound, typeof(NemLetezoEntitasExample))]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.HaziFeladatMenteseSikeres, typeof(void))]
|
||||
public void UpdateHaziFeladat([FromUri] int id, [FromBody] HaziFeladatUpdateRequestDto request)
|
||||
{
|
||||
((HaziFeladatFacade)Activator.CreateInstance(typeof(HaziFeladatFacade), FelhasznaloLogic.GetFelhasznalo(), _fileServiceHelper, _coreApiClient)).UpdateHaziFeladat(id, request);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Házi feladat törlése
|
||||
/// </summary>
|
||||
[HttpDelete, Route("HaziFeladat/{id}")]
|
||||
[SwaggerResponse(HttpStatusCode.NotFound, DescriptionLookUp.NemLetezoEntitasResponseLeiras + DescriptionLookUp.HaziFeladatTorleseSikertelenAHaziFeladatNemLetezik, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.NotFound, typeof(NemLetezoEntitasExample))]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.HaziFeladatTorleseSikeres, typeof(void))]
|
||||
public void DeleteHaziFeladat([FromUri] int id)
|
||||
{
|
||||
((HaziFeladatFacade)Activator.CreateInstance(typeof(HaziFeladatFacade), FelhasznaloLogic.GetFelhasznalo(), _coreApiClient)).DeleteHaziFeladat(id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Házi feladat csatolmány törlése
|
||||
/// </summary>
|
||||
[HttpDelete, Route("HaziFeladat/Csatolmany/{id}")]
|
||||
[SwaggerResponse(HttpStatusCode.NotFound, DescriptionLookUp.NemLetezoEntitasResponseLeiras, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.NotFound, typeof(NemLetezoEntitasExample))]
|
||||
[SwaggerResponse(HttpStatusCode.NoContent, DescriptionLookUp.HaziFeladatCsatolmanyTorlesSikeres, typeof(void))]
|
||||
public void HaziFeladatCsatolmanyTorles(int id)
|
||||
{
|
||||
((HaziFeladatFacade)Activator.CreateInstance(typeof(HaziFeladatFacade), FelhasznaloLogic.GetFelhasznalo(), _fileServiceHelper)).HaziFeladatCsatolmanyTorles(id);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Web.Http;
|
||||
using Kreta.Naplo.BusinessLogic.V3.Igazolas;
|
||||
using Kreta.Naplo.Domain.V3.Enum;
|
||||
using Kreta.Naplo.Dto.V3.Exception;
|
||||
using Kreta.Naplo.Dto.V3.Igazolas;
|
||||
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 IgazolasController : ApiController
|
||||
{
|
||||
[HttpGet, Route("Igazolas")]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.IgazolasResponseLeiras, typeof(IgazolasResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.OK, typeof(DummyListExampleProvider<IgazolasController, IgazolasResponseDto>))]
|
||||
public IEnumerable<IgazolasResponseDto> GetIgazolas([FromUri] int tanuloId)
|
||||
{
|
||||
return ModelToDto(((IgazolasFacade)Activator.CreateInstance(typeof(IgazolasFacade), FelhasznaloLogic.GetFelhasznalo())).GetIgazolas(tanuloId));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Igazolás rögzítése
|
||||
/// </summary>
|
||||
[HttpPost, Route("Igazolas")]
|
||||
[SwaggerResponse(HttpStatusCode.BadRequest, DescriptionLookUp.ValidaciosHibaTortentResponseLeiras, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.IgazolasMenteseSikeres, typeof(void))]
|
||||
public void CreateIgazolas(IgazolasCreateRequestDto request)
|
||||
{
|
||||
((IgazolasFacade)Activator.CreateInstance(typeof(IgazolasFacade), FelhasznaloLogic.GetFelhasznalo())).CreateIgazolas(request);
|
||||
}
|
||||
|
||||
[HttpDelete, Route("Igazolas/{id}")]
|
||||
[SwaggerResponse(HttpStatusCode.NotFound, DescriptionLookUp.NemLetezoEntitasResponseLeiras, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.NotFound, typeof(NemLetezoEntitasExample))]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.IgazolasTorlesSikeres)]
|
||||
public void DeleteIgazolas([FromUri] int id)
|
||||
{
|
||||
((IgazolasFacade)Activator.CreateInstance(typeof(IgazolasFacade), FelhasznaloLogic.GetFelhasznalo())).DeleteIgazolas(id);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
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<IskolaorController, IskolaorResponseDto>))]
|
||||
public List<IskolaorResponseDto> GetIskolaorList()
|
||||
{
|
||||
return ModelToDto(((IskolaorFacade)Activator.CreateInstance(typeof(IskolaorFacade), FelhasznaloLogic.GetFelhasznalo())).ListIskolaor());
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Web.Http;
|
||||
using Kreta.Naplo.BusinessLogic.V3.Ora;
|
||||
using Kreta.Naplo.Domain.V3.Enum;
|
||||
using Kreta.Naplo.Dto.V3.Exception;
|
||||
using Kreta.Naplo.Dto.V3.Ora;
|
||||
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 + "/Ora")]
|
||||
[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 OraController : ApiController
|
||||
{
|
||||
[HttpGet, Route("Feljegyzes")]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.OraFeljegyzesResponseLeiras, typeof(OraFeljegyzesResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.OK, typeof(DummyExampleProvider<OraController, OraFeljegyzesResponseDto>))]
|
||||
public List<OraFeljegyzesResponseDto> GetOraFeljegyzesek([FromUri] OraFeljegyzesRequestDto request)
|
||||
{
|
||||
return ModelToDto(((OraFacade)Activator.CreateInstance(typeof(OraFacade), FelhasznaloLogic.GetFelhasznalo())).GetOraFeljegyzesek(request));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,149 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Web.Http;
|
||||
using Kreta.BusinessLogic.Interfaces;
|
||||
using Kreta.Client.CoreApi;
|
||||
using Kreta.Naplo.BusinessLogic.V3.Orarend;
|
||||
using Kreta.Naplo.Domain.V3.Enum;
|
||||
using Kreta.Naplo.Domain.V3.Orarend;
|
||||
using Kreta.Naplo.Dto.V3.Exception;
|
||||
using Kreta.Naplo.Dto.V3.Orarend;
|
||||
using Kreta.Naplo.Dto.V3.OsztalyCsoport;
|
||||
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 + "/Orarend")]
|
||||
[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 OrarendController : ApiController
|
||||
{
|
||||
private readonly IFileServiceHelper _fileServiceHelper;
|
||||
|
||||
private readonly ICoreApiClient _coreApiClient;
|
||||
|
||||
public OrarendController(IFileServiceHelper fileServiceHelper, ICoreApiClient coreApiClient)
|
||||
{
|
||||
_fileServiceHelper = fileServiceHelper ?? throw new ArgumentNullException(nameof(fileServiceHelper));
|
||||
_coreApiClient = coreApiClient ?? throw new ArgumentNullException(nameof(coreApiClient));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Órarend lekérdezése
|
||||
/// </summary>
|
||||
[HttpGet, Route("")]
|
||||
[SwaggerResponse(HttpStatusCode.NotFound, DescriptionLookUp.NemLetezoEntitasResponseLeiras + DescriptionLookUp.OraTorolveLett, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.NotFound, typeof(NemLetezoEntitasExample))]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.ListaUidVagyUidsFilterResponseLeiras, typeof(OrarendElemResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.OK, typeof(DummyListExampleProviderWithDependencyInjection<OrarendController, OrarendElemResponseDto>))]
|
||||
public HashSet<OrarendElemResponseDto> GetOrarend([FromUri] OrarendRequestDto request)
|
||||
{
|
||||
return ModelToDto(((OrarendFacade)Activator.CreateInstance(typeof(OrarendFacade), FelhasznaloLogic.GetFelhasznalo())).GetOrarend(request));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Órarend elem entitás lekérdezése
|
||||
/// </summary>
|
||||
[HttpGet, Route("OrarendElem")]
|
||||
[SwaggerResponse(HttpStatusCode.NotFound, DescriptionLookUp.NemLetezoEntitasResponseLeiras + DescriptionLookUp.OraTorolveLett, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.NotFound, typeof(NemLetezoEntitasExample))]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.ListaUidVagyUidsFilterResponseLeiras, typeof(OrarendElemResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.OK, typeof(DummyExampleProviderWithDependencyInjection<OrarendController, OrarendElemResponseDto>))]
|
||||
public OrarendElemResponseDto GetOrarendElem([FromUri] OrarendElemRequestDto request)
|
||||
{
|
||||
return ((OrarendFacade)Activator.CreateInstance(typeof(OrarendFacade), FelhasznaloLogic.GetFelhasznalo())).GetOrarendElem(request);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Óra naplózása
|
||||
/// </summary>
|
||||
[HttpPost, Route("OraNaplozas")]
|
||||
[SwaggerResponse(HttpStatusCode.NotFound, DescriptionLookUp.NemLetezoEntitasResponseLeiras + DescriptionLookUp.NaplozasSikertelenAzOraMarNemLetezikAKivalasztottNapon, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.NotFound, typeof(NemLetezoEntitasExample))]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.OraNaplozasaSikeres)]
|
||||
public string OraNaplozas(OraNaplozasRequestDto request)
|
||||
{
|
||||
return ((OrarendFacade)Activator.CreateInstance(typeof(OrarendFacade), FelhasznaloLogic.GetFelhasznalo(), _fileServiceHelper, _coreApiClient)).OraNaplozas(request);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Óra naplózási adatok törlése
|
||||
/// </summary>
|
||||
[HttpDelete, Route("OraNaplozas")]
|
||||
[SwaggerResponse(HttpStatusCode.NotFound, DescriptionLookUp.NemLetezoEntitasResponseLeiras + DescriptionLookUp.OraTorolveLett, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.NotFound, typeof(NemLetezoEntitasExample))]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.OraNaplozasTorlesSikeres)]
|
||||
public string OraNaplozasTorles([FromUri] OraNaplozasTorlesRequestDto request)
|
||||
{
|
||||
return ((OrarendFacade)Activator.CreateInstance(typeof(OrarendFacade), FelhasznaloLogic.GetFelhasznalo())).OraNaplozasTorles(request);
|
||||
}
|
||||
|
||||
[HttpGet, Route("Jelenlet")]
|
||||
[SwaggerResponse(HttpStatusCode.NotFound, DescriptionLookUp.NemLetezoEntitasResponseLeiras + DescriptionLookUp.OraTorolveLett, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.NotFound, typeof(NemLetezoEntitasExample))]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.TanuloJelenletResponseLeiras, typeof(TanuloJelenletResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.OK, typeof(DummyListExampleProviderWithDependencyInjection<OrarendController, TanuloJelenletResponseDto>))]
|
||||
public IEnumerable<TanuloJelenletResponseDto> GetJelenlet([FromUri] TanuloJelenletRequestDto request)
|
||||
{
|
||||
return ModelToDto(((OrarendFacade)Activator.CreateInstance(typeof(OrarendFacade), FelhasznaloLogic.GetFelhasznalo())).GetTanuloJelenlet(request));
|
||||
}
|
||||
|
||||
[HttpGet, Route("Hetirend")]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.ListaUidVagyUidsFilterResponseLeiras + DescriptionLookUp.HetirendSzoveg, typeof(HetirendListResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.OK, typeof(DummyListExampleProviderWithDependencyInjection<OrarendController, HetirendListResponseDto>))]
|
||||
[SwaggerResponse(HttpStatusCode.BadRequest, DescriptionLookUp.ValidaciosHibaTortentResponseLeiras, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.BadRequest, typeof(ValidaciosHibaExample<HetirendListRequest, HetirendListRequest>))]
|
||||
public IEnumerable<HetirendListResponseDto> ListHetirend([FromUri] HetirendListRequestDto request)
|
||||
{
|
||||
return ModelToDto(((OrarendFacade)Activator.CreateInstance(typeof(OrarendFacade), FelhasznaloLogic.GetFelhasznalo())).ListHetirend(request));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Bejelentett számonkérés lekérdezése
|
||||
/// </summary>
|
||||
/// <param name="id">Számonkérés id</param>
|
||||
[HttpGet, Route("BejelentettSzamonkeres/{id}")]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.ListaUidVagyUidsFilterResponseLeiras, typeof(BejelentettSzamonkeresekResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.OK, typeof(DummyExampleProviderWithDependencyInjection<OrarendController, BejelentettSzamonkeresekResponseDto>))]
|
||||
[SwaggerResponse(HttpStatusCode.NotFound, DescriptionLookUp.NemLetezoEntitasResponseLeiras, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.NotFound, typeof(NemLetezoEntitasExample))]
|
||||
public BejelentettSzamonkeresekResponseDto GetBejelentettSzamonkeres([FromUri] int id)
|
||||
{
|
||||
return ((OrarendFacade)Activator.CreateInstance(typeof(OrarendFacade), FelhasznaloLogic.GetFelhasznalo())).GetBejelentettSzamonkeres(id);
|
||||
}
|
||||
|
||||
|
||||
[HttpDelete, Route("BejelentettSzamonkeres/{id}")]
|
||||
[SwaggerResponse(HttpStatusCode.BadRequest, DescriptionLookUp.ValidaciosHibaTortentResponseLeiras, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponse(HttpStatusCode.NoContent, DescriptionLookUp.SzamonkeresTorleseSikeres)]
|
||||
public void DeleteBejelentettSzamonkeres([FromUri] int id)
|
||||
{
|
||||
((OrarendFacade)Activator.CreateInstance(typeof(OrarendFacade), FelhasznaloLogic.GetFelhasznalo())).DeleteBejelentettSzamonkeres(id);
|
||||
}
|
||||
|
||||
[HttpPost, Route("BejelentettSzamonkeres")]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.SzamonkeresRogzitesSikeres)]
|
||||
[SwaggerResponse(HttpStatusCode.BadRequest, DescriptionLookUp.ValidaciosHibaTortentResponseLeiras, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerRequestExample(typeof(SzamonkeresRequestDto), typeof(SzamonkeresRequestDto))]
|
||||
public void PostSzamonkeres(SzamonkeresRequestDto request)
|
||||
{
|
||||
((OrarendFacade)Activator.CreateInstance(typeof(OrarendFacade), FelhasznaloLogic.GetFelhasznalo())).PostSzamonkeres(request);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,129 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Web.Http;
|
||||
using Kreta.Naplo.BusinessLogic.V3.OsztalyCsoport;
|
||||
using Kreta.Naplo.Domain.V3.Enum;
|
||||
using Kreta.Naplo.Dto.V3.Converter;
|
||||
using Kreta.Naplo.Dto.V3.Exception;
|
||||
using Kreta.Naplo.Dto.V3.OsztalyCsoport;
|
||||
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 + "/OsztalyCsoport")]
|
||||
[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 OsztalyCsoportController : ApiController
|
||||
{
|
||||
[HttpGet, Route("Ertekeles")]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.TanuloErtekeleseiResponseLeiras, typeof(OsztalyCsoportErtekelesekResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.OK, typeof(DummyListExampleProvider<OsztalyCsoportController, OsztalyCsoportErtekelesekResponseDto>))]
|
||||
public HashSet<OsztalyCsoportErtekelesekResponseDto> GetTanuloErtekelesek([FromUri] OsztalyCsoportErtekelesekRequestDto request)
|
||||
{
|
||||
return ModelToDto(((OsztalyCsoportFacade)Activator.CreateInstance(typeof(OsztalyCsoportFacade), FelhasznaloLogic.GetFelhasznalo())).GetOsztalyCsoportErtekelesek(request));
|
||||
}
|
||||
|
||||
[HttpPost, Route("Ertekeles")]
|
||||
[SwaggerResponse(HttpStatusCode.BadRequest, DescriptionLookUp.ValidaciosHibaTortentResponseLeiras, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponse(HttpStatusCode.NoContent, DescriptionLookUp.ErtekelesRogzitesSikeres)]
|
||||
[SwaggerRequestExample(typeof(OsztalyCsoportErtekelesRequestDto), typeof(OsztalyCsoportErtekelesRequestDto))]
|
||||
public void CreateOsztalyCsoportErtekeles(List<OsztalyCsoportErtekelesRequestDto> request)
|
||||
{
|
||||
((OsztalyCsoportFacade)Activator.CreateInstance(typeof(OsztalyCsoportFacade), FelhasznaloLogic.GetFelhasznalo())).CreateOsztalyCsoportErtekeles(RequestModelConverter.DtoToModel(request));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Mondatbank lekérdezése
|
||||
/// </summary>
|
||||
[HttpGet, Route("Ertekeles/Mondatbank")]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.MondatbankResponseLeiras, typeof(MondatbankResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.OK, typeof(DummyListExampleProvider<OsztalyCsoportController, MondatbankResponseDto>))]
|
||||
[SwaggerResponse(HttpStatusCode.NotFound, DescriptionLookUp.NemLetezoEntitasResponseLeiras, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.NotFound, typeof(NemLetezoEntitasExample))]
|
||||
public IEnumerable<MondatbankResponseDto> GetMondatbank([FromUri] MondatbankRequestDto request)
|
||||
{
|
||||
return ModelToDto(((OsztalyCsoportFacade)Activator.CreateInstance(typeof(OsztalyCsoportFacade), FelhasznaloLogic.GetFelhasznalo())).GetMondatbank(request));
|
||||
}
|
||||
|
||||
[HttpGet, Route("Tanulok")]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.OsztalyCsoportTanuloiResponseLeiras, typeof(OsztalyCsoportTanuloResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.OK, typeof(DummyListExampleProvider<OsztalyCsoportController, OsztalyCsoportTanuloResponseDto>))]
|
||||
public IEnumerable<OsztalyCsoportTanuloResponseDto> GetOsztalyCsoportTanuloi([FromUri] OsztalyCsoportTanuloRequestDto request)
|
||||
{
|
||||
return ModelToDto(((OsztalyCsoportFacade)Activator.CreateInstance(typeof(OsztalyCsoportFacade), FelhasznaloLogic.GetFelhasznalo())).GetOsztalyCsoportTanuloi(request));
|
||||
}
|
||||
|
||||
[HttpGet, Route("Tanulok/{id}")]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.OsztalyCsoportTanuloAdatokResponseLeiras, typeof(OsztalyCsoportTanuloAdatokResponseDto))]
|
||||
[SwaggerResponse(HttpStatusCode.NotFound, DescriptionLookUp.NemLetezoEntitasResponseLeiras, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.NotFound, typeof(NemLetezoEntitasExample))]
|
||||
public OsztalyCsoportTanuloAdatokResponseDto GetOsztalyCsoportTanuloAdatok([FromUri] int id)
|
||||
{
|
||||
return ((OsztalyCsoportFacade)Activator.CreateInstance(typeof(OsztalyCsoportFacade), FelhasznaloLogic.GetFelhasznalo())).GetOsztalyCsoportTanuloAdatok(id);
|
||||
}
|
||||
|
||||
[HttpGet, Route("")]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.OsztalyCsoportResponseLeiras, typeof(OsztalyokCsoportokResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.OK, typeof(DummyListExampleProvider<OsztalyCsoportController, OsztalyokCsoportokResponseDto>))]
|
||||
public IEnumerable<OsztalyokCsoportokResponseDto> GetOsztalyokCsoportok()
|
||||
{
|
||||
return ModelToDto(((OsztalyCsoportFacade)Activator.CreateInstance(typeof(OsztalyCsoportFacade), FelhasznaloLogic.GetFelhasznalo())).GetOsztalyokCsoportok());
|
||||
}
|
||||
|
||||
[HttpGet, Route("Tanulok/Ertekeles")]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.TanuloErtekeleseiResponseLeiras, typeof(TanuloErtekelesekResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.OK, typeof(DummyListExampleProvider<OsztalyCsoportController, TanuloErtekelesekResponseDto>))]
|
||||
[SwaggerResponse(HttpStatusCode.NotFound, DescriptionLookUp.NemLetezoEntitasResponseLeiras, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.NotFound, typeof(NemLetezoEntitasExample))]
|
||||
public IEnumerable<TanuloErtekelesekResponseDto> GetTanuloErtekelesei([FromUri] TanuloErtekelesekRequestDto request)
|
||||
{
|
||||
return ModelToDto(((OsztalyCsoportFacade)Activator.CreateInstance(typeof(OsztalyCsoportFacade), FelhasznaloLogic.GetFelhasznalo())).GetTanuloErtekelesei(request));
|
||||
}
|
||||
|
||||
[HttpPut, Route("Tanulok/Ertekeles/{id}")]
|
||||
[SwaggerResponse(HttpStatusCode.BadRequest, DescriptionLookUp.ValidaciosHibaTortentResponseLeiras, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.TanuloErtekelesMentesSikeres, typeof(TanuloErtekelesMentesRequestDto))]
|
||||
[SwaggerResponse(HttpStatusCode.NotFound, DescriptionLookUp.NemLetezoEntitasResponseLeiras, typeof(NaploExceptionResponseDto))]
|
||||
public void TanuloErtekelesMentes([FromUri] int id, [FromBody] TanuloErtekelesMentesRequestDto request)
|
||||
{
|
||||
((OsztalyCsoportFacade)Activator.CreateInstance(typeof(OsztalyCsoportFacade), FelhasznaloLogic.GetFelhasznalo())).TanuloErtekelesMentes(id, request);
|
||||
}
|
||||
|
||||
[HttpDelete, Route("Tanulok/Ertekeles/{id}")]
|
||||
[SwaggerResponse(HttpStatusCode.BadRequest, DescriptionLookUp.ValidaciosHibaTortentResponseLeiras, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponse(HttpStatusCode.NoContent, DescriptionLookUp.ErtekelesTorleseSikeres)]
|
||||
public void DeleteOsztalyCsoportErtekeles([FromUri] int id)
|
||||
{
|
||||
((OsztalyCsoportFacade)Activator.CreateInstance(typeof(OsztalyCsoportFacade), FelhasznaloLogic.GetFelhasznalo())).DeleteOsztalyCsoportErtekeles(id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Bejelentett számonkérések lekérdezése
|
||||
/// </summary>
|
||||
[HttpGet, Route("BejelentettSzamonkeres")]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.BejelentettSzamonkeresResponseLeiras, typeof(BejelentettSzamonkeresekResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.OK, typeof(DummyListExampleProviderWithDependencyInjection<OsztalyCsoportController, BejelentettSzamonkeresekResponseDto>))]
|
||||
[SwaggerResponse(HttpStatusCode.NotFound, DescriptionLookUp.NemLetezoEntitasResponseLeiras, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.NotFound, typeof(NemLetezoEntitasExample))]
|
||||
public IEnumerable<BejelentettSzamonkeresekResponseDto> GetBejelentettSzamonkeresek([FromUri] BejelentettSzamonkeresekRequestDto request)
|
||||
{
|
||||
return ModelToDto(((OsztalyCsoportFacade)Activator.CreateInstance(typeof(OsztalyCsoportFacade), FelhasznaloLogic.GetFelhasznalo())).GetBejelentettSzamonkeresek(request));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,66 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Web.Http;
|
||||
using Kreta.Naplo.BusinessLogic.V3.Tanar;
|
||||
using Kreta.Naplo.Domain.V3.Enum;
|
||||
using Kreta.Naplo.Dto.V3.Exception;
|
||||
using Kreta.Naplo.Dto.V3.Tanar;
|
||||
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 + "/Tanar")]
|
||||
[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 TanarController : ApiController
|
||||
{
|
||||
[HttpGet, Route("Profil")]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.TanarAdataiResponseLeiras, typeof(ProfilResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.OK, typeof(DummyExampleProvider<TanarController, ProfilResponseDto>))]
|
||||
public ProfilResponseDto GetProfil()
|
||||
{
|
||||
return ((TanarFacade)Activator.CreateInstance(typeof(TanarFacade), FelhasznaloLogic.GetFelhasznalo())).GetProfil();
|
||||
}
|
||||
|
||||
[HttpGet, Route("Beallitasok")]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.TanarBeallitasokResponseLeiras, typeof(BeallitasokResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.OK, typeof(DummyExampleProvider<TanarController, BeallitasokResponseDto>))]
|
||||
public BeallitasokResponseDto GetBeallitasok()
|
||||
{
|
||||
return ((TanarFacade)Activator.CreateInstance(typeof(TanarFacade), FelhasznaloLogic.GetFelhasznalo())).GetBeallitasok();
|
||||
}
|
||||
|
||||
[HttpPost, Route("Beallitasok")]
|
||||
[SwaggerResponse(HttpStatusCode.NoContent, DescriptionLookUp.BeallitasRogzitesSikeres)]
|
||||
[SwaggerRequestExample(typeof(BeallitasokRequestDto), typeof(BeallitasokRequestDto))]
|
||||
public void PostBeallitasok(BeallitasokRequestDto request)
|
||||
{
|
||||
((TanarFacade)Activator.CreateInstance(typeof(TanarFacade), FelhasznaloLogic.GetFelhasznalo())).PostBeallitasok(request);
|
||||
}
|
||||
|
||||
[HttpGet, Route("Tantargyfelosztas")]
|
||||
[SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.TanarTantargyFelosztasai, typeof(TantargyFelosztasResponseDto))]
|
||||
[SwaggerResponse(HttpStatusCode.NotFound, DescriptionLookUp.NemLetezoEntitasResponseLeiras, typeof(NaploExceptionResponseDto))]
|
||||
[SwaggerResponseExample(HttpStatusCode.NotFound, typeof(NemLetezoEntitasExample))]
|
||||
public IEnumerable<TantargyFelosztasResponseDto> GetOsztalyCsoportTantargyak()
|
||||
{
|
||||
return ModelToDto(((TanarFacade)Activator.CreateInstance(typeof(TanarFacade), FelhasznaloLogic.GetFelhasznalo())).GetTantargyFelosztas());
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
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));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
using Kreta.Core;
|
||||
using Kreta.Core.Enum;
|
||||
using Kreta.Naplo.Dto.V3.Exception;
|
||||
using Swashbuckle.Examples;
|
||||
|
||||
namespace Kreta.Naplo.WebApi.V3.Documentation
|
||||
{
|
||||
public class AMuveletNemVegezhetoElTobbszorExample : NaploExceptionResponseDto, IExamplesProvider
|
||||
{
|
||||
public AMuveletNemVegezhetoElTobbszorExample() : base(BlExceptionType.AMuveletNemVegezhetoElTobbszor, BlExceptionType.AMuveletNemVegezhetoElTobbszor.ToDisplayName())
|
||||
{
|
||||
}
|
||||
|
||||
public object GetExamples() => new AMuveletNemVegezhetoElTobbszorExample();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,112 @@
|
|||
namespace Kreta.Naplo.WebApi.V3.Documentation
|
||||
{
|
||||
internal static class DescriptionLookUp
|
||||
{
|
||||
public const string ListaUidVagyUidsFilterResponseLeiras = "Filter által elvárt, de nem létező resource esetén kizárólag a létező elemek szerepelnek a response-ban";
|
||||
|
||||
public const string TanarAdataiResponseLeiras = "A tanár adatai szerepelnek a response-ban";
|
||||
|
||||
public const string TanarTorolveLett = " Abban az esetben, ha él a token, de a tanár már törölve lett.";
|
||||
|
||||
public const string FelhasznaloTorolveLett = " Abban az esetben, ha él a token, de a felhasználó már törölve lett.";
|
||||
|
||||
public const string OraTorolveLett = " Az óra már törölve lett.";
|
||||
|
||||
public const string IsmeretlenHibaTortentResponseLeiras = "Ismeretlen hiba történt!";
|
||||
|
||||
public const string NincsNevelesOkatatasSzures = "(Nincs nevelés oktatás szűrés)";
|
||||
|
||||
public const string ValidaciosHibaTortentResponseLeiras = "Validációs hiba történt!";
|
||||
|
||||
public const string JogosulatlanTokenLejartResponseLeiras = "A token lejárt!";
|
||||
|
||||
public const string HozzaferesMegtagadvaResponseLeiras = "Hozzáférés megtagadva!";
|
||||
|
||||
public const string NemLetezoEntitasResponseLeiras = "Nem létező entitás!";
|
||||
|
||||
public const string DummyEnumResponseLeiras = "A rendszerben megtalálható összes enum érték szerepel a response-ban<br>None elem csak BE számára kell, jelzi," +
|
||||
" ha az enum nem tudott értéket felvenni";
|
||||
|
||||
public const string ListDummyResponseLeiras = "Még el nem készült BE fejlesztések találhatóak a responseban";
|
||||
|
||||
public const string NincsJogosultsaga = "Nincs jogosultsága";
|
||||
|
||||
public const string KeresTullepteMaxFutasiIdot = "A kérés túllépte a maximálisan megengedett futási időt!";
|
||||
|
||||
public const string TanevetValtottAzIntezmeny = "Tanévet váltott az intézmény!";
|
||||
|
||||
public const string TanmenetResponseLeiras = "Tanmenetek szerepelnek a responseban.";
|
||||
|
||||
public const string Rendszermodul = "Rendszermodulok";
|
||||
|
||||
public const string IntezmenyAdatai = "Saját intézmény adatai";
|
||||
|
||||
public const string IskolaorResponseLeiras = "Az iskolaőrök adatai szerepelnek a response-ban.";
|
||||
|
||||
public const string JelszoValtoztatasSikeres = "A jelszó változtatása sikeresen megtörtént!";
|
||||
|
||||
public const string LepEloadasResponseLeiras = "A Lázár Ervin Program által meghirdetett előadások szerepelnek a responseban.";
|
||||
|
||||
public const string TraceDummyResponseLeiras = "TraceLogger dummy";
|
||||
|
||||
public const string ErtekelesRogzitesSikeres = "Az értékelés rögzítése sikeresen megtörtént!";
|
||||
|
||||
public const string EnumResponseLeiras = "Az enum adatai szerepelnek a response-ban";
|
||||
|
||||
public const string OraFeljegyzesResponseLeiras = "Az órán naplózott feljegyzések szerepelnek a response-ban.";
|
||||
|
||||
public const string TanuloErtekeleseiResponseLeiras = "A tanuló értékelései szerepelnek a response-ban";
|
||||
|
||||
public const string OraNaplozasaSikeres = "Az óra naplózása sikeresen megtörtént! A response-ban visszaadjuk a naplózott óra új id-ját. (TanitasiOra)";
|
||||
|
||||
public const string TanuloJelenletResponseLeiras = "Tanulók jelenlét adatai szerepelnek a response-ban";
|
||||
|
||||
public const string NaplozasSikertelenAzOraMarNemLetezikAKivalasztottNapon = "Naplózás sikertelen: az óra már nem létezik a kiválasztott napon!";
|
||||
|
||||
public const string OsztalyCsoportTanuloiResponseLeiras = "Az osztályhoz/csoporthoz tartozó tanulók adatai szerepelnek a response-ban";
|
||||
|
||||
public const string TanarBeallitasokResponseLeiras = "A tanár beállításai szerepelnek a response-ban";
|
||||
|
||||
public const string BeallitasRogzitesSikeres = "A beállítás rögzítése sikeresen megtörtént!";
|
||||
|
||||
public const string HaziFeladatRogziteseSikertelenAzOraMarNemLetezikAKivalasztottNapon = "; Házi feladat rögzítése sikertelen: az óra már nem létezik a kiválasztott napon!";
|
||||
|
||||
public const string HaziFeladatMenteseSikeres = "Házi feladat mentése sikeresen megtörtént!";
|
||||
|
||||
public const string HaziFeladatModositasaSikertelenAHaziFeladatNemLetezik = " Házi feladat módosítása sikertelen: a házi feladat nem létezik!";
|
||||
|
||||
public const string OraNaplozasTorlesSikeres = "Az óra naplózási adatok törlése sikeresen megtörtént! A response-ban visszaadjuk a törölt naplózás órájának id-ját. (OrarendiOra)";
|
||||
|
||||
public const string ErtekelesTorleseSikeres = "Az értékelés törlése sikeresen megtörtént!";
|
||||
|
||||
public const string HetirendSzoveg = "A megadott intervallumba beletartozó (fedik egymást) entitásokkal tér vissza.";
|
||||
|
||||
public const string HaziFeladatTorleseSikertelenAHaziFeladatNemLetezik = "Házi feladat törlése sikertelen: a házi feladat nem létezik!";
|
||||
|
||||
public const string HaziFeladatTorleseSikeres = "Házi feladat törlése sikeresen megtörtént!";
|
||||
|
||||
public const string HaziFeladatCsatolmanyTorlesSikeres = "A házi feladat csatolmány törlése sikeresen megtörtént!";
|
||||
|
||||
public const string OsztalyCsoportTanuloAdatokResponseLeiras = "Az osztályhoz/csoporthoz tartozó tanuló adatai szerepelnek a response-ban";
|
||||
|
||||
public const string MondatbankResponseLeiras = "A mondatbankhoz tartozó adatok szerepelnek a response-ban";
|
||||
|
||||
public const string TanarTantargyFelosztasai = "A tanár osztálycsoportjaihoz tartozó tantárgyak szerepelnek a response-ban";
|
||||
|
||||
public const string IgazolasResponseLeiras = "Tanulóhoz rögzített igazolások adatai szerepelnek a response-ban.";
|
||||
|
||||
public const string IgazolasTorlesSikeres = "Az igazolás törlése sikeresen megtörtént!";
|
||||
|
||||
public const string OsztalyCsoportResponseLeiras = "Az intézményben található osztályok/csoportok adatai szerepelnek a response-ban.";
|
||||
|
||||
public const string IgazolasMenteseSikeres = "Igazolás mentése sikeresen megtörtént!";
|
||||
|
||||
public const string BejelentettSzamonkeresResponseLeiras = "A bejelentett számonkérések listája szerepel a response-ban.";
|
||||
|
||||
public const string TanuloErtekelesMentesSikeres = "Értékelés mentése sikeresen megtörtént!";
|
||||
|
||||
public const string SzamonkeresTorleseSikeres = "A számonkérés törlése sikeresen megtörtént!";
|
||||
|
||||
public const string SzamonkeresRogzitesSikeres = "A számonkérés rögzítése sikeresen megtörtént!";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,62 @@
|
|||
using System;
|
||||
using Kreta.BusinessLogic.Interfaces;
|
||||
using Kreta.Client.CoreApi;
|
||||
using Kreta.Naplo.Dto.V3.Interfaces;
|
||||
using Kreta.Naplo.WebApi.V3.Documentation.Helper;
|
||||
using Kreta.Naplo.WebApi.V3.Documentation.MockServices;
|
||||
using Swashbuckle.Examples;
|
||||
|
||||
namespace Kreta.Naplo.WebApi.V3.Documentation
|
||||
{
|
||||
internal class DummyExampleProvider<TController, TDto> : IExamplesProvider where TController : new() where TDto : IDtoDocumentation, new()
|
||||
{
|
||||
public object GetExamples()
|
||||
{
|
||||
object response = ExampleHelper.TryGetExampleFeatureDefaultExampleModel();
|
||||
if (response != null)
|
||||
{
|
||||
return response;
|
||||
}
|
||||
|
||||
TDto dto = new TDto();
|
||||
object[] parameterArray = dto.Example.RequestParameter == null ? new object[] { } : new[] { dto.Example.RequestParameter };
|
||||
|
||||
ExampleHelper.MockUser(dto.Example.MockUserName);
|
||||
|
||||
return new
|
||||
{
|
||||
RequestExample = dto.Example.RequestParameter,
|
||||
RequestExampleUser = dto.Example.MockUserName,
|
||||
ResponseExample = typeof(TController).GetMethod(dto.Example.MethodName).Invoke(new TController(), parameterArray)
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
internal class DummyExampleProviderWithDependencyInjection<TController, TDto> : IExamplesProvider where TDto : IDtoDocumentation, new()
|
||||
{
|
||||
private readonly IFileServiceHelper _fileServiceHelper = new FileServiceHelperMock();
|
||||
|
||||
private readonly ICoreApiClient _coreApiClient = new CoreApiClientMock();
|
||||
|
||||
public object GetExamples()
|
||||
{
|
||||
object response = ExampleHelper.TryGetExampleFeatureDefaultExampleModel();
|
||||
if (response != null)
|
||||
{
|
||||
return response;
|
||||
}
|
||||
|
||||
TDto dto = new TDto();
|
||||
object[] parameterArray = dto.Example.RequestParameter == null ? new object[] { } : new[] { dto.Example.RequestParameter };
|
||||
|
||||
ExampleHelper.MockUser(dto.Example.MockUserName);
|
||||
|
||||
return new
|
||||
{
|
||||
RequestExample = dto.Example.RequestParameter,
|
||||
RequestExampleUser = dto.Example.MockUserName,
|
||||
ResponseExample = typeof(TController).GetMethod(dto.Example.MethodName).Invoke((TController)Activator.CreateInstance(typeof(TController), _fileServiceHelper, _coreApiClient), parameterArray)
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,67 @@
|
|||
using System;
|
||||
using Kreta.BusinessLogic.Interfaces;
|
||||
using Kreta.Client.CoreApi;
|
||||
using Kreta.Naplo.Dto.V3.Interfaces;
|
||||
using Kreta.Naplo.WebApi.V3.Documentation.Helper;
|
||||
using Kreta.Naplo.WebApi.V3.Documentation.MockServices;
|
||||
using Swashbuckle.Examples;
|
||||
|
||||
namespace Kreta.Naplo.WebApi.V3.Documentation
|
||||
{
|
||||
|
||||
internal class DummyListExampleProvider<TController, TDto> : IExamplesProvider where TController : new() where TDto : IDtoListDocumentation, new()
|
||||
{
|
||||
public object GetExamples()
|
||||
{
|
||||
object response = ExampleHelper.TryGetExampleFeatureDefaultExampleModel();
|
||||
if (response != null)
|
||||
{
|
||||
return response;
|
||||
}
|
||||
|
||||
TDto dto = new TDto();
|
||||
object[] parameterArray = dto.ListExample.RequestParameter == null
|
||||
? new object[] { }
|
||||
: new[] { dto.ListExample.RequestParameter };
|
||||
|
||||
ExampleHelper.MockUser(dto.ListExample.MockUserName);
|
||||
|
||||
return new
|
||||
{
|
||||
RequestExample = dto.ListExample.RequestParameter,
|
||||
RequestExampleUser = dto.ListExample.MockUserName,
|
||||
ResponseExample = typeof(TController).GetMethod(dto.ListExample.MethodName).Invoke(new TController(), parameterArray)
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
internal class DummyListExampleProviderWithDependencyInjection<TController, TDto> : IExamplesProvider where TDto : IDtoListDocumentation, new()
|
||||
{
|
||||
private readonly IFileServiceHelper _fileServiceHelper = new FileServiceHelperMock();
|
||||
|
||||
private readonly ICoreApiClient _coreApiClient = new CoreApiClientMock();
|
||||
|
||||
public object GetExamples()
|
||||
{
|
||||
object response = ExampleHelper.TryGetExampleFeatureDefaultExampleModel();
|
||||
if (response != null)
|
||||
{
|
||||
return response;
|
||||
}
|
||||
|
||||
TDto dto = new TDto();
|
||||
object[] parameterArray = dto.ListExample.RequestParameter == null
|
||||
? new object[] { }
|
||||
: new[] { dto.ListExample.RequestParameter };
|
||||
|
||||
ExampleHelper.MockUser(dto.ListExample.MockUserName);
|
||||
|
||||
return new
|
||||
{
|
||||
RequestExample = dto.ListExample.RequestParameter,
|
||||
RequestExampleUser = dto.ListExample.MockUserName,
|
||||
ResponseExample = typeof(TController).GetMethod(dto.ListExample.MethodName).Invoke((TController)Activator.CreateInstance(typeof(TController), _fileServiceHelper, _coreApiClient), parameterArray)
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,58 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Web;
|
||||
using Kreta.Core.Enum;
|
||||
using Kreta.Core.Exceptions;
|
||||
using Kreta.Naplo.Domain.V3.Common;
|
||||
using Kreta.Naplo.Domain.V3.Enum;
|
||||
|
||||
namespace Kreta.Naplo.WebApi.V3.Documentation.Helper
|
||||
{
|
||||
internal static class ExampleHelper
|
||||
{
|
||||
private static readonly bool s_isExampleValuesEnabled = bool.Parse(ConfigurationManager.AppSettings["IsExampleValuesEnabled"]);
|
||||
|
||||
public static void MockUser(MockUserName mockUserName)
|
||||
{
|
||||
const string MockMobileUserHttpContextKey = "MobileUser";
|
||||
|
||||
if (HttpContext.Current.Items.Contains(MockMobileUserHttpContextKey))
|
||||
{
|
||||
HttpContext.Current.Items.Remove(MockMobileUserHttpContextKey);
|
||||
}
|
||||
|
||||
const string MockUserIntemenyAzonosito = "biatorbagyi";
|
||||
const int MockUserTanevId = 5963;
|
||||
const string MockTanarUserName = "farkase";
|
||||
const int MockTanarUserId = 629608;
|
||||
var mockMobileTanarIdpUniqueId = new Guid("bf37a8ca-8c59-4030-b6e1-4c1f5e80da48");
|
||||
var mockInstituteUniqueId = new Guid("a88cf92a-8c24-4592-90c8-fb095b26ebdb");
|
||||
|
||||
switch (mockUserName)
|
||||
{
|
||||
case MockUserName.Farkase:
|
||||
HttpContext.Current.Items.Add(MockMobileUserHttpContextKey, new MobileUser(MockUserIntemenyAzonosito,
|
||||
MockTanarUserId,
|
||||
MockTanarUserName,
|
||||
new List<FelhasznaloSzerepkor> { FelhasznaloSzerepkor.Tanar },
|
||||
MockUserTanevId,
|
||||
mockMobileTanarIdpUniqueId,
|
||||
mockInstituteUniqueId));
|
||||
break;
|
||||
case MockUserName.None:
|
||||
default:
|
||||
throw new BlException(BlExceptionType.ElvartErtekNemTalalhato);
|
||||
}
|
||||
}
|
||||
|
||||
public static object TryGetExampleFeatureDefaultExampleModel()
|
||||
=> s_isExampleValuesEnabled ? null : new Dictionary<object, object>
|
||||
{
|
||||
{
|
||||
"Figyelmeztetés",
|
||||
"A példák nincsenek engedélyezve."
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
using Kreta.Core;
|
||||
using Kreta.Core.Enum;
|
||||
using Kreta.Naplo.Dto.V3.Exception;
|
||||
using Swashbuckle.Examples;
|
||||
|
||||
namespace Kreta.Naplo.WebApi.V3.Documentation
|
||||
{
|
||||
public class IntezmenyMarTanevetValtottExample : NaploExceptionResponseDto, IExamplesProvider
|
||||
{
|
||||
public IntezmenyMarTanevetValtottExample() : base(BlExceptionType.IntezmenyMarTanevetValtott, BlExceptionType.IntezmenyMarTanevetValtott.ToDisplayName())
|
||||
{
|
||||
}
|
||||
|
||||
public object GetExamples() => new IntezmenyMarTanevetValtottExample();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
using Kreta.Core;
|
||||
using Kreta.Core.Enum;
|
||||
using Kreta.Naplo.Dto.V3.Exception;
|
||||
using Swashbuckle.Examples;
|
||||
|
||||
namespace Kreta.Naplo.WebApi.V3.Documentation
|
||||
{
|
||||
public class IsmeretlenHibaExample : NaploExceptionResponseDto, IExamplesProvider
|
||||
{
|
||||
public IsmeretlenHibaExample() : base(BlExceptionType.None, BlExceptionType.None.ToDisplayName())
|
||||
{
|
||||
}
|
||||
|
||||
public object GetExamples() => new IsmeretlenHibaExample();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
using Kreta.Core;
|
||||
using Kreta.Core.Enum;
|
||||
using Kreta.Naplo.Dto.V3.Exception;
|
||||
using Swashbuckle.Examples;
|
||||
|
||||
namespace Kreta.Naplo.WebApi.V3.Documentation
|
||||
{
|
||||
public class JogosulatlanExample : NaploExceptionResponseDto, IExamplesProvider
|
||||
{
|
||||
public JogosulatlanExample() : base(BlExceptionType.NincsJogosultsag, BlExceptionType.NincsJogosultsag.ToDisplayName())
|
||||
{
|
||||
}
|
||||
|
||||
public object GetExamples() => new JogosulatlanExample();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
using Swashbuckle.Examples;
|
||||
|
||||
namespace Kreta.Naplo.WebApi.V3.Documentation
|
||||
{
|
||||
public class LejartTokenExample : IExamplesProvider
|
||||
{
|
||||
#pragma warning disable S3253 // Constructor and destructor declarations should not be redundant
|
||||
public LejartTokenExample()
|
||||
{
|
||||
}
|
||||
|
||||
#pragma warning restore S3253 // Constructor and destructor declarations should not be redundant
|
||||
public object GetExamples() => "invalid_grant";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Client.CoreApi;
|
||||
using Kreta.Client.CoreApi.Request;
|
||||
using Kreta.Client.CoreApi.Response;
|
||||
|
||||
namespace Kreta.Naplo.WebApi.V3.Documentation.MockServices
|
||||
{
|
||||
|
||||
internal class CoreApiClientMock : ICoreApiClient
|
||||
{
|
||||
public DKTFeladatInsertResponse DKTFeladatInsert(DKTFeladatInsertRequest request, int alkalmazottId)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public DKTFeladatResponse DKTFeladatUpdate(DKTFeladatUpdateRequest request, int alkalmazottId)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public DKTFeladatResponse DKTFeladatDelete(DKTFeladatDeleteRequest request)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public EszkozIgenylesCreateResponse EszkozIgenylesInsert(EszkozIgenylesCreateDto request, string intezmenyGuid, int tanevSorszam)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public CoreApiResponse EszkozIgenylesUpdate(EszkozIgenylesUpdateDto request, string intezmenyGuid, int tanevSorszam)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public List<EszkozIgenylesDto> EszkozIgenylesGet(string intezmenyGuid, int tanevSorszam)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
using Kreta.BusinessLogic.Interfaces;
|
||||
using Kreta.Client.FileService.Request;
|
||||
using Kreta.Client.FileService.Response;
|
||||
|
||||
namespace Kreta.Naplo.WebApi.V3.Documentation.MockServices
|
||||
{
|
||||
|
||||
internal class FileServiceHelperMock : IFileServiceHelper
|
||||
{
|
||||
public FileUploadResponse Upload(IFileUploadRequest fileUploadRequest)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public string GetUrl(string intezmenyAzonosito, GetUrlRequest fileDownloadRequest)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
public GetFileResponse GetFile(string intezmenyAzonosito, GetUrlRequest fileDownloadRequest)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public bool Delete(string intezmenyAzonosito, FileDeleteRequest fileDeleteRequest)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public FileFinalizeResponseV3 Veglegesites(FileFinalizeRequestV3 fileVeglegesitesRequest)
|
||||
{
|
||||
return new FileFinalizeResponseV3();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
using Kreta.Core;
|
||||
using Kreta.Core.Enum;
|
||||
using Kreta.Naplo.Dto.V3.Exception;
|
||||
using Swashbuckle.Examples;
|
||||
|
||||
namespace Kreta.Naplo.WebApi.V3.Documentation
|
||||
{
|
||||
public class NemLetezoEntitasExample : NaploExceptionResponseDto, IExamplesProvider
|
||||
{
|
||||
public NemLetezoEntitasExample() : base(BlExceptionType.NemLetezoEntitas, BlExceptionType.NemLetezoEntitas.ToDisplayName())
|
||||
{
|
||||
}
|
||||
|
||||
public object GetExamples() => new NemLetezoEntitasExample();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
using Swashbuckle.Examples;
|
||||
|
||||
namespace Kreta.Naplo.WebApi.V3.Documentation
|
||||
{
|
||||
public class PermissionDeniedExample : IExamplesProvider
|
||||
{
|
||||
#pragma warning disable S3253 // Constructor and destructor declarations should not be redundant
|
||||
public PermissionDeniedExample()
|
||||
{
|
||||
}
|
||||
|
||||
#pragma warning restore S3253 // Constructor and destructor declarations should not be redundant
|
||||
public object GetExamples() => "permission_denied";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
using Kreta.Core;
|
||||
using Kreta.Core.Enum;
|
||||
using Kreta.Naplo.Dto.V3.Exception;
|
||||
using Swashbuckle.Examples;
|
||||
|
||||
namespace Kreta.Naplo.WebApi.V3.Documentation
|
||||
{
|
||||
public class TimeOutExample : NaploExceptionResponseDto, IExamplesProvider
|
||||
{
|
||||
public TimeOutExample() : base(BlExceptionType.TimeOut, BlExceptionType.TimeOut.ToDisplayName())
|
||||
{
|
||||
}
|
||||
|
||||
public object GetExamples() => new TimeOutExample();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Kreta.Core;
|
||||
using Kreta.Core.Domain;
|
||||
using Kreta.Core.Enum;
|
||||
using Kreta.Naplo.Domain.V3.Interfaces;
|
||||
using Kreta.Naplo.Dto.V3.Exception;
|
||||
using Swashbuckle.Examples;
|
||||
|
||||
namespace Kreta.Naplo.WebApi.V3.Documentation
|
||||
{
|
||||
/// <summary>
|
||||
/// Author: DevKornél Created On: 2019.05.
|
||||
/// </summary>
|
||||
public class ValidaciosHibaExample<TModel, TSameModel> : NaploExceptionResponseDto, IExamplesProvider where TModel : class, IModelValidacio<TSameModel>, new() where TSameModel : class
|
||||
{
|
||||
public ValidaciosHibaExample() : base(BlExceptionType.ModelValidacio, BlExceptionType.ModelValidacio.ToDisplayName())
|
||||
{
|
||||
}
|
||||
|
||||
public ValidaciosHibaExample(IEnumerable<DetailedErrorItem> errorList)
|
||||
: base(BlExceptionType.ModelValidacio, BlExceptionType.ModelValidacio.ToDisplayName(), errorList.ToList())
|
||||
{
|
||||
}
|
||||
|
||||
public object GetExamples()
|
||||
{
|
||||
List<DetailedErrorItem> example = new List<DetailedErrorItem>();
|
||||
int index = 0;
|
||||
|
||||
new List<string>(new TModel().ModelValidaciok.Values).ForEach(x => example.Add(new DetailedErrorItem($"custom_{++index}", x, BlExceptionType.ModelValidacio)));
|
||||
|
||||
return new ValidaciosHibaExample<TModel, TSameModel>(example);
|
||||
}
|
||||
}
|
||||
}
|
30
Kreta.WebApi/Naplo/Kreta.Naplo.WebApi/Web.Debug.config
Normal file
30
Kreta.WebApi/Naplo/Kreta.Naplo.WebApi/Web.Debug.config
Normal file
|
@ -0,0 +1,30 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!-- For more information on using web.config transformation visit https://go.microsoft.com/fwlink/?LinkId=125889 -->
|
||||
|
||||
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
|
||||
<!--
|
||||
In the example below, the "SetAttributes" transform will change the value of
|
||||
"connectionString" to use "ReleaseSQLServer" only when the "Match" locator
|
||||
finds an attribute "name" that has a value of "MyDB".
|
||||
|
||||
<connectionStrings>
|
||||
<add name="MyDB"
|
||||
connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
|
||||
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
|
||||
</connectionStrings>
|
||||
-->
|
||||
<system.web>
|
||||
<!--
|
||||
In the example below, the "Replace" transform will replace the entire
|
||||
<customErrors> section of your web.config file.
|
||||
Note that because there is only one customErrors section under the
|
||||
<system.web> node, there is no need to use the "xdt:Locator" attribute.
|
||||
|
||||
<customErrors defaultRedirect="GenericError.htm"
|
||||
mode="RemoteOnly" xdt:Transform="Replace">
|
||||
<error statusCode="500" redirect="InternalError.htm"/>
|
||||
</customErrors>
|
||||
-->
|
||||
</system.web>
|
||||
</configuration>
|
31
Kreta.WebApi/Naplo/Kreta.Naplo.WebApi/Web.Release.config
Normal file
31
Kreta.WebApi/Naplo/Kreta.Naplo.WebApi/Web.Release.config
Normal file
|
@ -0,0 +1,31 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!-- For more information on using web.config transformation visit https://go.microsoft.com/fwlink/?LinkId=125889 -->
|
||||
|
||||
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
|
||||
<!--
|
||||
In the example below, the "SetAttributes" transform will change the value of
|
||||
"connectionString" to use "ReleaseSQLServer" only when the "Match" locator
|
||||
finds an attribute "name" that has a value of "MyDB".
|
||||
|
||||
<connectionStrings>
|
||||
<add name="MyDB"
|
||||
connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
|
||||
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
|
||||
</connectionStrings>
|
||||
-->
|
||||
<system.web>
|
||||
<compilation xdt:Transform="RemoveAttributes(debug)" />
|
||||
<!--
|
||||
In the example below, the "Replace" transform will replace the entire
|
||||
<customErrors> section of your web.config file.
|
||||
Note that because there is only one customErrors section under the
|
||||
<system.web> node, there is no need to use the "xdt:Locator" attribute.
|
||||
|
||||
<customErrors defaultRedirect="GenericError.htm"
|
||||
mode="RemoteOnly" xdt:Transform="Replace">
|
||||
<error statusCode="500" redirect="InternalError.htm"/>
|
||||
</customErrors>
|
||||
-->
|
||||
</system.web>
|
||||
</configuration>
|
209
Kreta.WebApi/Naplo/Kreta.Naplo.WebApi/Web.config
Normal file
209
Kreta.WebApi/Naplo/Kreta.Naplo.WebApi/Web.config
Normal file
|
@ -0,0 +1,209 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<section name="KretaNaploApi" type="Kreta.Naplo.Configuration.Kreta.KretaNaploApiConfiguration" />
|
||||
<section name="ApiKeyConfiguration" type="Kreta.Core.Configuratiaton.ApiKeyConfiguration, Kreta.Core" />
|
||||
<section name="RequestResponseLogging" type="Kreta.Web.Logging.Configuration.RequestResponseLoggingConfigurationSection, Kreta.Web.Logging" />
|
||||
<section name="SerilogRequestResponseLogger" type="Kreta.Web.Logging.Configuration.Serilog.SerilogConfigurationSection, Kreta.Web.Logging" />
|
||||
<section name="SerilogTraceLogger" type="Kreta.Web.Logging.Configuration.Serilog.SerilogConfigurationSection, Kreta.Web.Logging" />
|
||||
<section name="FileShareConfiguration" type="Kreta.Core.FileShare.FileShareConfiguration" />
|
||||
<section name="CorsConfiguration" type="Kreta.Naplo.Configuration.CorsConfiguration" />
|
||||
<section name="ServerConfig" type="Kreta.BusinessLogic.Classes.ConfigsectionHandler" />
|
||||
</configSections>
|
||||
<ServerConfig>
|
||||
<config>
|
||||
<server>
|
||||
<name>KRETA_MOBIL_LOCAL</name>
|
||||
<systemtype>Teszt</systemtype>
|
||||
<port>18099</port>
|
||||
<loglevel>DEBUG</loglevel>
|
||||
<sessiontimeout>46</sessiontimeout>
|
||||
<!-- A felhasználok inaktivitással töltött max ideje mindig 1 percel kevesebb mint a session idő, (ha 1 akkor 30 másodperc lesz) -->
|
||||
<!-- Az egy kérésben felhozható rekordok maximális száma. -->
|
||||
<maxrecordsperrequest>30000</maxrecordsperrequest>
|
||||
<dbconnection>Data Source=kretadevsql01\inst02;User ID=_SQL_mobil_app;Password=7qRpZsB@Ylgi;Initial Catalog=KRETA_MOBIL_LOCAL</dbconnection>
|
||||
<globalapidbconnection>Data Source={0};User ID=kreta;Password=Porcica1.;Initial Catalog={1};MultiSubnetFailover=true;Connection Timeout=100;</globalapidbconnection>
|
||||
<lcid>1038</lcid>
|
||||
</server>
|
||||
</config>
|
||||
</ServerConfig>
|
||||
<KretaNaploApi ApiKey="4b6b476d-fb80-4f0a-bae1-3511c97fa37f" BaseUrl="http://{0}.ekreta.hu/api/mobile" />
|
||||
<ApiKeyConfiguration ApiKey="659ad164-ef2b-4de6-9220-7361bcd3b7e1" Enabled="false" />
|
||||
<CorsConfiguration IsEnabled="true" Urls="https://localhost:44301" Headers="*" Methods="*" SupportsCredentials="true" />
|
||||
<RequestResponseLogging EnableLogging="false">
|
||||
<TraceLogging EnableLogging="false" LogOnlyOnError="false" LoggingModes="internal, external" LogLevels="info, warning, error" ExternalLoggerType="Serilog" InternalLogMaximumLength="512" />
|
||||
<!-- Define handlers here. Handlers are fallback type handlers (if first handler could not log the request second will be applied then third etc.) -->
|
||||
<Handlers>
|
||||
<Handler RequestMediaTypes="multipart/form-data" LogLevels="info" RequestHeaderTrimLength="2048" RequestBodyTrimLength="0" ResponseHeaderTrimLength="2048" ResponseBodyTrimLength="4096" />
|
||||
<Handler RequestMediaTypes="multipart/form-data" LogLevels="error" RequestHeaderTrimLength="4096" RequestBodyTrimLength="0" ResponseHeaderTrimLength="4096" ResponseBodyTrimLength="32768" />
|
||||
<Handler ResponseMediaTypes="text/html" LogLevels="info" RequestHeaderTrimLength="2048" RequestBodyTrimLength="2048" ResponseHeaderTrimLength="2048" ResponseBodyTrimLength="0" />
|
||||
<Handler ResponseMediaTypes="application/json, application/xml, text/plain, empty" LogLevels="info" RequestHeaderTrimLength="2048" RequestBodyTrimLength="2048" ResponseHeaderTrimLength="2048" ResponseBodyTrimLength="4096" />
|
||||
<Handler ResponseMediaTypes="text/html, application/json, application/xml, text/plain, empty" LogLevels="error" RequestHeaderTrimLength="4096" RequestBodyTrimLength="32768" ResponseHeaderTrimLength="4096" ResponseBodyTrimLength="32768" />
|
||||
</Handlers>
|
||||
</RequestResponseLogging>
|
||||
<SerilogRequestResponseLogger LossyBufferSize="10000">
|
||||
<ElasticSearch UseCustomBackOffLogic="true" NodeUris="http://elasticsearch.ekreta-dev.hu:9200/" IndexFormat="kreta_naplo_requestresponselog_serilog-{0:yyyy.MM.dd}" MinimumLogEventLevel="Information" ConnectionTimeoutInSeconds="30" WaitBetweenForCheckingEventBatchesInSeconds="1" BatchPostingLimit="100" AutoRegisterTemplateVersion="ESv7" />
|
||||
</SerilogRequestResponseLogger>
|
||||
<appSettings>
|
||||
<add key="idp:Authority" value="https://idp.ekreta.hu" />
|
||||
<add key="idp:RequiredScopes" value="kreta-naplo-webapi.public" />
|
||||
<add key="IsSwaggerUiEnabled" value="true" />
|
||||
<add key="IsExampleValuesEnabled" value="false" />
|
||||
</appSettings>
|
||||
<system.web>
|
||||
<compilation debug="true" targetFramework="4.8" />
|
||||
<httpRuntime targetFramework="4.6.1" />
|
||||
<pages>
|
||||
<namespaces>
|
||||
<remove namespace="Kendo.Mvc.UI" />
|
||||
<remove namespace="MvcSiteMapProvider.Web.Html" />
|
||||
<remove namespace="MvcSiteMapProvider.Web.Html.Models" />
|
||||
</namespaces>
|
||||
</pages>
|
||||
</system.web>
|
||||
<system.webServer>
|
||||
<modules>
|
||||
<remove name="UsageModule" />
|
||||
<remove name="LoggingModule" />
|
||||
<remove name="Session" />
|
||||
</modules>
|
||||
<handlers>
|
||||
<remove name="ExtensionlessUrlHandler-Integrated-4.0" />
|
||||
<remove name="OPTIONSVerbHandler" />
|
||||
<remove name="TRACEVerbHandler" />
|
||||
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
|
||||
</handlers>
|
||||
</system.webServer>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Extensions.Configuration.Abstractions" publicKeyToken="ADB9793829DDAE60" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.0.1.0" newVersion="2.0.1.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Extensions.Configuration" publicKeyToken="ADB9793829DDAE60" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Owin.Host.SystemWeb" publicKeyToken="31BF3856AD364E35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
|
||||
<bindingRedirect oldVersion="1.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
|
||||
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.2.6.0" newVersion="5.2.6.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.2.6.0" newVersion="5.2.6.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="SimpleInjector" publicKeyToken="984cb50dea722e99" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.11.0" newVersion="4.0.11.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.0.8.0" newVersion="2.0.8.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.IdentityModel.Logging" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.4.0.0" newVersion="5.4.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.IdentityModel.Tokens" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.4.0.0" newVersion="5.4.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Owin.Security.OAuth" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Owin.Security.Jwt" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.IdentityModel.Tokens.Jwt" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.20622.1351" newVersion="4.0.20622.1351" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Cors" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Extensions.Configuration.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.0.1.0" newVersion="2.0.1.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Extensions.FileProviders.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Extensions.Configuration.FileExtensions" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Extensions.FileProviders.Physical" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Extensions.Configuration" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Extensions.Options" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.0.1.0" newVersion="2.0.1.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="CacheManager.Core" publicKeyToken="5b450b4fb65c4cdb" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.2.0.0" newVersion="1.2.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.4.1" newVersion="4.0.4.1" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.IO.Pipelines" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.2.1" newVersion="4.0.2.1" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.1.1" newVersion="4.0.1.1" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Threading.Channels" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
89
Kreta.WebApi/Naplo/Kreta.Naplo.WebApi/packages.config
Normal file
89
Kreta.WebApi/Naplo/Kreta.Naplo.WebApi/packages.config
Normal file
|
@ -0,0 +1,89 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="CacheManager.Core" version="1.2.0" targetFramework="net48" />
|
||||
<package id="CacheManager.StackExchange.Redis" version="1.2.0" targetFramework="net48" />
|
||||
<package id="CacheManager.SystemRuntimeCaching" version="1.2.0" targetFramework="net48" />
|
||||
<package id="DevDefined.OAuth" version="0.2" targetFramework="net48" />
|
||||
<package id="Easy.Logger" version="3.2.0" targetFramework="net48" />
|
||||
<package id="Easy.Logger.Interfaces" version="1.1.0" targetFramework="net48" />
|
||||
<package id="Elasticsearch.Net" version="7.0.0" targetFramework="net48" />
|
||||
<package id="IdentityModel" version="1.9.2" targetFramework="net48" />
|
||||
<package id="IdentityServer3.AccessTokenValidation" version="2.14.0" targetFramework="net48" />
|
||||
<package id="Kreta.Core.Configuration" version="1.3.20119.1" targetFramework="net48" />
|
||||
<package id="Kreta.Core.IoC" version="1.2.63491" targetFramework="net48" />
|
||||
<package id="Kreta.Core.Validation" version="2.0.16" targetFramework="net48" />
|
||||
<package id="Kreta.Web.Logging" version="1.4.5" targetFramework="net48" />
|
||||
<package id="Kreta.Web.Logging.Abstractions" version="1.0.12" targetFramework="net48" />
|
||||
<package id="log4net" version="2.0.8" targetFramework="net48" />
|
||||
<package id="log4net.ElasticSearch" version="2.3.6" targetFramework="net48" />
|
||||
<package id="Meziantou.Analyzer" version="1.0.688" targetFramework="net48" developmentDependency="true" />
|
||||
<package id="Microsoft.AspNet.Cors" version="5.0.0" targetFramework="net48" />
|
||||
<package id="Microsoft.AspNet.WebApi" version="5.2.6" targetFramework="net48" />
|
||||
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.6" targetFramework="net48" />
|
||||
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.6" targetFramework="net48" />
|
||||
<package id="Microsoft.AspNet.WebApi.Cors" version="5.0.0" targetFramework="net48" />
|
||||
<package id="Microsoft.AspNet.WebApi.Owin" version="5.2.6" targetFramework="net48" />
|
||||
<package id="Microsoft.AspNet.WebApi.OwinSelfHost" version="5.2.6" targetFramework="net48" />
|
||||
<package id="Microsoft.AspNet.WebApi.WebHost" version="5.2.6" targetFramework="net48" />
|
||||
<package id="Microsoft.Bcl.AsyncInterfaces" version="1.0.0" targetFramework="net48" />
|
||||
<package id="Microsoft.DotNet.PlatformAbstractions" version="2.0.4" targetFramework="net48" />
|
||||
<package id="Microsoft.Extensions.Configuration" version="2.0.0" targetFramework="net48" />
|
||||
<package id="Microsoft.Extensions.Configuration.Abstractions" version="2.0.1" targetFramework="net48" />
|
||||
<package id="Microsoft.Extensions.Configuration.Binder" version="2.0.0" targetFramework="net48" />
|
||||
<package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="2.0.0" targetFramework="net48" />
|
||||
<package id="Microsoft.Extensions.DependencyModel" version="2.0.4" targetFramework="net48" />
|
||||
<package id="Microsoft.Extensions.Options" version="2.0.1" targetFramework="net48" />
|
||||
<package id="Microsoft.Extensions.Options.ConfigurationExtensions" version="2.0.0" targetFramework="net48" />
|
||||
<package id="Microsoft.Extensions.Primitives" version="2.0.0" targetFramework="net48" />
|
||||
<package id="Microsoft.IdentityModel.Logging" version="5.4.0" targetFramework="net48" />
|
||||
<package id="Microsoft.IdentityModel.Protocol.Extensions" version="1.0.2.206221351" targetFramework="net48" />
|
||||
<package id="Microsoft.IdentityModel.Tokens" version="5.4.0" targetFramework="net48" />
|
||||
<package id="Microsoft.Owin" version="4.1.0" targetFramework="net48" />
|
||||
<package id="Microsoft.Owin.Cors" version="3.1.0" targetFramework="net48" />
|
||||
<package id="Microsoft.Owin.Host.HttpListener" version="3.1.0" targetFramework="net48" />
|
||||
<package id="Microsoft.Owin.Host.SystemWeb" version="4.1.0" targetFramework="net48" />
|
||||
<package id="Microsoft.Owin.Hosting" version="3.1.0" targetFramework="net48" />
|
||||
<package id="Microsoft.Owin.Security" version="4.1.0" targetFramework="net48" />
|
||||
<package id="Microsoft.Owin.Security.Jwt" version="3.1.0" targetFramework="net48" />
|
||||
<package id="Microsoft.Owin.Security.OAuth" version="3.1.0" targetFramework="net48" />
|
||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
||||
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net48" />
|
||||
<package id="Nexius.Common" version="1.0.0.29" targetFramework="net48" />
|
||||
<package id="Nexius.IdentityProvider.Model" version="1.0.0.93" targetFramework="net48" />
|
||||
<package id="Owin" version="1.0" targetFramework="net48" />
|
||||
<package id="Pipelines.Sockets.Unofficial" version="1.0.7" targetFramework="net48" />
|
||||
<package id="Serilog" version="2.8.0" targetFramework="net48" />
|
||||
<package id="Serilog.Formatting.Compact" version="1.0.0" targetFramework="net48" />
|
||||
<package id="Serilog.Formatting.Elasticsearch" version="8.0.0" targetFramework="net48" />
|
||||
<package id="Serilog.Settings.Configuration" version="3.1.0" targetFramework="net48" />
|
||||
<package id="Serilog.Sinks.Elasticsearch" version="8.0.0" targetFramework="net48" />
|
||||
<package id="Serilog.Sinks.File" version="4.0.0" targetFramework="net48" />
|
||||
<package id="Serilog.Sinks.PeriodicBatching" version="2.1.1" targetFramework="net48" />
|
||||
<package id="Serilog.Sinks.RollingFile" version="3.3.0" targetFramework="net48" />
|
||||
<package id="SimpleInjector" version="4.0.11" targetFramework="net48" />
|
||||
<package id="SimpleInjector.Integration.WebApi" version="4.0.11" targetFramework="net48" />
|
||||
<package id="StackExchange.Redis" version="2.0.513" targetFramework="net48" />
|
||||
<package id="Swashbuckle" version="5.6.0" targetFramework="net48" />
|
||||
<package id="Swashbuckle.Core" version="5.6.0" targetFramework="net48" />
|
||||
<package id="Swashbuckle.Examples" version="3.12.0" targetFramework="net48" />
|
||||
<package id="System.Buffers" version="4.5.0" targetFramework="net48" />
|
||||
<package id="System.Diagnostics.DiagnosticSource" version="4.5.1" targetFramework="net48" />
|
||||
<package id="System.Diagnostics.PerformanceCounter" version="4.5.0" targetFramework="net48" />
|
||||
<package id="System.IdentityModel.Tokens.Jwt" version="4.0.2.206221351" targetFramework="net48" />
|
||||
<package id="System.IO" version="4.3.0" targetFramework="net48" />
|
||||
<package id="System.IO.Compression" version="4.3.0" targetFramework="net48" />
|
||||
<package id="System.IO.Pipelines" version="4.7.1" targetFramework="net48" />
|
||||
<package id="System.Memory" version="4.5.3" targetFramework="net48" />
|
||||
<package id="System.Net.Http" version="4.3.4" targetFramework="net48" />
|
||||
<package id="System.Numerics.Vectors" version="4.4.0" targetFramework="net48" />
|
||||
<package id="System.Runtime" version="4.3.0" targetFramework="net48" />
|
||||
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.3" targetFramework="net48" />
|
||||
<package id="System.Security.Cryptography.Algorithms" version="4.3.1" targetFramework="net48" />
|
||||
<package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net48" />
|
||||
<package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net48" />
|
||||
<package id="System.Security.Cryptography.X509Certificates" version="4.3.2" targetFramework="net48" />
|
||||
<package id="System.Threading.Channels" version="4.7.1" targetFramework="net48" />
|
||||
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net48" />
|
||||
<package id="Wdc.System.Net.Http.Formatting.NetStandard" version="1.0.7" targetFramework="net48" />
|
||||
<package id="WebActivatorEx" version="2.2.0" targetFramework="net48" />
|
||||
</packages>
|
Loading…
Add table
Add a link
Reference in a new issue