Add ValidatePDF feature with API, Swagger, and tests
Implemented the ValidatePDF feature end-to-end: - Added `/api/v1/documents/validate` Minimal API endpoint. - Introduced centralized ExceptionHandlingMiddleware. - Configured Swagger with `AddSwaggerDocumentation` extension. - Enabled XML comments in `DocumentOperator.API.csproj`. - Updated DTOs with XML comments and added `FileSizeMB`. - Added integration tests for the ValidatePDF endpoint (3 tests). - Registered infrastructure services (e.g., `IPdfProcessor`). - Refactored `Program.cs` to include middleware and endpoints. - Updated PHASENPLAN.md and ROADMAP.md to reflect progress. - Cleaned up code and made `Program` accessible for tests.
This commit is contained in:
22
DocumentOperator.Infrastructure/DependencyInjection.cs
Normal file
22
DocumentOperator.Infrastructure/DependencyInjection.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using DocumentOperator.Application.Common.Interfaces;
|
||||
using DocumentOperator.Infrastructure.Services.PdfProcessing;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace DocumentOperator.Infrastructure;
|
||||
|
||||
/// <summary>
|
||||
/// Dependency Injection configuration for Infrastructure Layer
|
||||
/// </summary>
|
||||
public static class DependencyInjection
|
||||
{
|
||||
/// <summary>
|
||||
/// Registers Infrastructure Layer services (DevExpress, File Storage, etc.)
|
||||
/// </summary>
|
||||
public static IServiceCollection AddInfrastructure(this IServiceCollection services)
|
||||
{
|
||||
// PDF Processing Service (DevExpress)
|
||||
services.AddScoped<IPdfProcessor, DevExpressPdfProcessor>();
|
||||
|
||||
return services;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user