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:
@@ -1,6 +1,28 @@
|
||||
namespace DocumentOperator.API.Configuration
|
||||
using Microsoft.OpenApi.Models;
|
||||
using System.Reflection;
|
||||
|
||||
namespace DocumentOperator.API.Configuration
|
||||
{
|
||||
public class SwaggerConfiguration
|
||||
public static class SwaggerConfiguration
|
||||
{
|
||||
public static IServiceCollection AddSwaggerDocumentation(this IServiceCollection services)
|
||||
{
|
||||
services.AddSwaggerGen(options =>
|
||||
{
|
||||
options.SwaggerDoc("v1", new OpenApiInfo
|
||||
{
|
||||
Title = "DD Document Operator API",
|
||||
Version = "v1",
|
||||
Description = "PDF Verarbeitungs-Service für Validierung, Stempel, Zertifikate, Anhänge & Zusammenführung"
|
||||
});
|
||||
|
||||
// XML-Kommentare einbinden
|
||||
var xmlFile = $"{Assembly.GetExecutingAssembly().GetName().Name}.xml";
|
||||
var xmlPath = Path.Combine(AppContext.BaseDirectory, xmlFile);
|
||||
options.IncludeXmlComments(xmlPath);
|
||||
});
|
||||
|
||||
return services;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user