Files
mixtape/zero.Api/Abstractions/ZeroApiController.cs
T
2021-12-29 15:29:33 +01:00

22 lines
679 B
C#

using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection;
namespace zero.Api.Abstractions;
[ApiController]
[ZeroAuthorize]
[ApiMetadataFilter]
[ApiResponseFilter]
[TypeFilter(typeof(ApiExceptionFilter))]
//[MiddlewareFilter(typeof(ApiUnhandledExceptionMiddlewareFilter))]
//[ServiceFilter(typeof(ModelStateValidationFilterAttribute))]
//[ServiceFilter(typeof(BackofficeFilterAttribute))]
public abstract class ZeroApiController : ControllerBase
{
IZeroMapper _mapper;
protected IZeroMapper Mapper => _mapper ?? (_mapper = HttpContext?.RequestServices?.GetService<IZeroMapper>());
public ApiRequestHints Hints { get; protected set; } = new();
}