Rebrand project: DocumentOperator to DocumentService
This commit implements a complete rebranding of the project: - Updated all namespaces from `DocumentOperator` to `DocumentService`. - Renamed file paths, embedded resources, and test data references. - Updated configuration keys, logging paths, and Redis instance names. - Revised documentation to reflect the new project name. - Modified project and solution files to align with the new structure. - Updated class names, DTOs, commands, queries, and handlers. - Adjusted middleware, controllers, and API endpoints. - Updated Swagger metadata and API titles to `DocumentService API`. - Refactored test namespaces, resource paths, and embedded resources. - Updated build and deployment configurations for the new name. - Replaced all references to `DocumentOperator` in comments and literals. These changes ensure consistency across the codebase and documentation.
This commit is contained in:
12
AGENTS.md
12
AGENTS.md
@@ -1,6 +1,6 @@
|
|||||||
# AGENTS.md
|
# AGENTS.md
|
||||||
|
|
||||||
Agent guidance for DocumentOperator service. Read this before working on the codebase.
|
Agent guidance for DocumentService service. Read this before working on the codebase.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -23,7 +23,7 @@ Agent guidance for DocumentOperator service. Read this before working on the cod
|
|||||||
### Migration Required
|
### Migration Required
|
||||||
|
|
||||||
**Existing code that needs replacement:**
|
**Existing code that needs replacement:**
|
||||||
- `DocumentOperator.API/Endpoints/v1/DocumentEndpoints.cs` → Delete, replace with Controllers
|
- `DocumentService.API/Endpoints/v1/DocumentEndpoints.cs` → Delete, replace with Controllers
|
||||||
- `Program.cs` line 72: `app.MapDocumentEndpoints()` → Replace with `app.MapControllers()`
|
- `Program.cs` line 72: `app.MapDocumentEndpoints()` → Replace with `app.MapControllers()`
|
||||||
- `Program.cs` line 44: Add `builder.Services.AddControllers()`
|
- `Program.cs` line 44: Add `builder.Services.AddControllers()`
|
||||||
- All DTOs → Support **BOTH** `IFormFile` (multipart) AND `Base64String` (JSON)
|
- All DTOs → Support **BOTH** `IFormFile` (multipart) AND `Base64String` (JSON)
|
||||||
@@ -195,7 +195,7 @@ dotnet test
|
|||||||
|
|
||||||
**Run API (Development):**
|
**Run API (Development):**
|
||||||
```powershell
|
```powershell
|
||||||
dotnet run --project DocumentOperator.API
|
dotnet run --project DocumentService.API
|
||||||
```
|
```
|
||||||
Swagger UI: `https://localhost:7186/swagger`
|
Swagger UI: `https://localhost:7186/swagger`
|
||||||
Serilog UI: `https://localhost:7186/serilog-ui` (Web-based log viewer)
|
Serilog UI: `https://localhost:7186/serilog-ui` (Web-based log viewer)
|
||||||
@@ -339,7 +339,7 @@ Do NOT skip steps. Each feature is done when it's **testable in Swagger UI with
|
|||||||
**All test PDFs are EmbeddedResource.** Access via:
|
**All test PDFs are EmbeddedResource.** Access via:
|
||||||
```csharp
|
```csharp
|
||||||
var stream = Assembly.GetExecutingAssembly()
|
var stream = Assembly.GetExecutingAssembly()
|
||||||
.GetManifestResourceStream("DocumentOperator.Tests.TestData.Pdfs.valid.pdf");
|
.GetManifestResourceStream("DocumentService.Tests.TestData.Pdfs.valid.pdf");
|
||||||
```
|
```
|
||||||
|
|
||||||
**Do NOT commit new binary files** without marking them as `<EmbeddedResource>`.
|
**Do NOT commit new binary files** without marking them as `<EmbeddedResource>`.
|
||||||
@@ -351,7 +351,7 @@ var stream = Assembly.GetExecutingAssembly()
|
|||||||
**3-folder structure (CORRECT approach by previous developer):**
|
**3-folder structure (CORRECT approach by previous developer):**
|
||||||
|
|
||||||
```
|
```
|
||||||
DocumentOperator.Tests/
|
DocumentService.Tests/
|
||||||
├── Integration/
|
├── Integration/
|
||||||
│ └── API/
|
│ └── API/
|
||||||
│ ├── PdfValidationControllerTests.cs (13 tests)
|
│ ├── PdfValidationControllerTests.cs (13 tests)
|
||||||
@@ -520,7 +520,7 @@ public async Task<IActionResult> Validate([FromForm] PdfInputModel input, Cancel
|
|||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
**appsettings.json sections:**
|
**appsettings.json sections:**
|
||||||
- `DocumentOperatorSettings` (future: file size limits, temp paths)
|
- `DocumentServiceSettings` (future: file size limits, temp paths)
|
||||||
- `RedisSettings` (future: multi-tenancy caching)
|
- `RedisSettings` (future: multi-tenancy caching)
|
||||||
- `ApiKeySettings` (future: authentication)
|
- `ApiKeySettings` (future: authentication)
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# DocumentOperator - Controller & Endpoint Specification
|
# DocumentService - Controller & Endpoint Specification
|
||||||
|
|
||||||
**Project:** DocumentService (DOC)
|
**Project:** DocumentService (DOC)
|
||||||
**Ticket:** DOC-1 - GDPicture and Nutrient Replacing
|
**Ticket:** DOC-1 - GDPicture and Nutrient Replacing
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
This specification defines the controller structure and REST API endpoints for the DocumentOperator service.
|
This specification defines the controller structure and REST API endpoints for the DocumentService service.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -293,7 +293,7 @@ The service can be used on the client side **without manual HTTP response handli
|
|||||||
|
|
||||||
**Example Client SDK:**
|
**Example Client SDK:**
|
||||||
```csharp
|
```csharp
|
||||||
var client = new DocumentOperatorClient("https://api.example.com");
|
var client = new DocumentServiceClient("https://api.example.com");
|
||||||
var result = await client.Pdf.Validation.ValidateAsync(pdfFile);
|
var result = await client.Pdf.Validation.ValidateAsync(pdfFile);
|
||||||
if (result.IsValid) { ... }
|
if (result.IsValid) { ... }
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ using Microsoft.AspNetCore.Mvc.ApiExplorer;
|
|||||||
using Microsoft.OpenApi.Models;
|
using Microsoft.OpenApi.Models;
|
||||||
using Swashbuckle.AspNetCore.SwaggerGen;
|
using Swashbuckle.AspNetCore.SwaggerGen;
|
||||||
|
|
||||||
namespace DocumentOperator.API.Configuration
|
namespace DocumentService.API.Configuration
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Swagger document filter that merges operations with same path but different [Consumes] attributes.
|
/// Swagger document filter that merges operations with same path but different [Consumes] attributes.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace DocumentOperator.API.Configuration
|
namespace DocumentService.API.Configuration
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Placeholder class for Serilog configuration extensions.
|
/// Placeholder class for Serilog configuration extensions.
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
using Microsoft.OpenApi.Models;
|
using Microsoft.OpenApi.Models;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
namespace DocumentOperator.API.Configuration
|
namespace DocumentService.API.Configuration
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Provides extension methods for configuring Swagger/OpenAPI documentation.
|
/// Provides extension methods for configuring Swagger/OpenAPI documentation.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace DocumentOperator.API.Configuration;
|
namespace DocumentService.API.Configuration;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Configuration settings for Swagger/OpenAPI documentation.
|
/// Configuration settings for Swagger/OpenAPI documentation.
|
||||||
@@ -19,7 +19,7 @@ public class SwaggerSettings
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// API title displayed in Swagger UI.
|
/// API title displayed in Swagger UI.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Title { get; set; } = "DocumentOperator API";
|
public string Title { get; set; } = "DocumentService API";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// API version.
|
/// API version.
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
using DocumentOperator.Application.AddAttachments;
|
using DocumentService.Application.AddAttachments;
|
||||||
using DocumentOperator.Application.CheckPdfAttachments.Queries;
|
using DocumentService.Application.CheckPdfAttachments.Queries;
|
||||||
using DocumentOperator.Application.Common.DTOs;
|
using DocumentService.Application.Common.DTOs;
|
||||||
using DocumentOperator.Application.ExtractPdfAttachments;
|
using DocumentService.Application.ExtractPdfAttachments;
|
||||||
using DocumentOperator.Domain.Common.Exceptions;
|
using DocumentService.Domain.Common.Exceptions;
|
||||||
using MediatR;
|
using MediatR;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
namespace DocumentOperator.API.Controllers;
|
namespace DocumentService.API.Controllers;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Controller for PDF attachment operations (detection, extraction, embedding)
|
/// Controller for PDF attachment operations (detection, extraction, embedding)
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
using DocumentOperator.Application.ConvertFromPdfA;
|
using DocumentService.Application.ConvertFromPdfA;
|
||||||
using DocumentOperator.Application.ConvertToPdfA;
|
using DocumentService.Application.ConvertToPdfA;
|
||||||
using DocumentOperator.Domain.Common.Exceptions;
|
using DocumentService.Domain.Common.Exceptions;
|
||||||
using MediatR;
|
using MediatR;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
namespace DocumentOperator.API.Controllers;
|
namespace DocumentService.API.Controllers;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Controller for PDF conversion operations (PDF ? PDF/A)
|
/// Controller for PDF conversion operations (PDF ? PDF/A)
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
using DocumentOperator.Application.AddAnnotation;
|
using DocumentService.Application.AddAnnotation;
|
||||||
using DocumentOperator.Application.AddStamp;
|
using DocumentService.Application.AddStamp;
|
||||||
using DocumentOperator.Application.MergePdfs;
|
using DocumentService.Application.MergePdfs;
|
||||||
using DocumentOperator.Domain.Common.Exceptions;
|
using DocumentService.Domain.Common.Exceptions;
|
||||||
using DocumentOperator.Domain.Models.ValueObjects;
|
using DocumentService.Domain.Models.ValueObjects;
|
||||||
using MediatR;
|
using MediatR;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
namespace DocumentOperator.API.Controllers;
|
namespace DocumentService.API.Controllers;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Controller for PDF operations (merge, stamp, annotate).
|
/// Controller for PDF operations (merge, stamp, annotate).
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
using DocumentOperator.Application.Common.DTOs;
|
using DocumentService.Application.Common.DTOs;
|
||||||
using DocumentOperator.Application.ValidatePdf.Queries;
|
using DocumentService.Application.ValidatePdf.Queries;
|
||||||
using DocumentOperator.Application.ValidatePdfA.Queries;
|
using DocumentService.Application.ValidatePdfA.Queries;
|
||||||
using DocumentOperator.Domain.Common.Exceptions;
|
using DocumentService.Domain.Common.Exceptions;
|
||||||
using MediatR;
|
using MediatR;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
namespace DocumentOperator.API.Controllers;
|
namespace DocumentService.API.Controllers;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// PDF validation operations
|
/// PDF validation operations
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
using DocumentOperator.Application.Common.DTOs;
|
using DocumentService.Application.Common.DTOs;
|
||||||
using DocumentOperator.Application.SwissQrCode.Queries;
|
using DocumentService.Application.SwissQrCode.Queries;
|
||||||
using DocumentOperator.Domain.Common.Exceptions;
|
using DocumentService.Domain.Common.Exceptions;
|
||||||
using MediatR;
|
using MediatR;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
namespace DocumentOperator.API.Controllers;
|
namespace DocumentService.API.Controllers;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Swiss QR Code extraction operations
|
/// Swiss QR Code extraction operations
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
using DocumentOperator.Application.Common.DTOs;
|
using DocumentService.Application.Common.DTOs;
|
||||||
using DocumentOperator.Application.ExtractZugferd;
|
using DocumentService.Application.ExtractZugferd;
|
||||||
using DocumentOperator.Application.HasZugferd.Queries;
|
using DocumentService.Application.HasZugferd.Queries;
|
||||||
using DocumentOperator.Domain.Common.Exceptions;
|
using DocumentService.Domain.Common.Exceptions;
|
||||||
using MediatR;
|
using MediatR;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
namespace DocumentOperator.API.Controllers;
|
namespace DocumentService.API.Controllers;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Controller for ZUGFeRD operations (detection, extraction)
|
/// Controller for ZUGFeRD operations (detection, extraction)
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
@DocumentOperator.API_HostAddress = http://localhost:5028
|
|
||||||
|
|
||||||
GET {{DocumentOperator.API_HostAddress}}/weatherforecast/
|
|
||||||
Accept: application/json
|
|
||||||
|
|
||||||
###
|
|
||||||
6
DocumentOperator.API/DocumentService.API.http
Normal file
6
DocumentOperator.API/DocumentService.API.http
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
@DocumentService.API_HostAddress = http://localhost:5028
|
||||||
|
|
||||||
|
GET {{DocumentService.API_HostAddress}}/weatherforecast/
|
||||||
|
Accept: application/json
|
||||||
|
|
||||||
|
###
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
using DocumentOperator.Domain.Common.Exceptions;
|
using DocumentService.Domain.Common.Exceptions;
|
||||||
using FluentValidation;
|
using FluentValidation;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
|
|
||||||
namespace DocumentOperator.API.Middleware;
|
namespace DocumentService.API.Middleware;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Central exception handling middleware
|
/// Central exception handling middleware
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace DocumentOperator.API.Middleware
|
namespace DocumentService.API.Middleware
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Placeholder middleware for HTTP request/response logging.
|
/// Placeholder middleware for HTTP request/response logging.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace DocumentOperator.API.Middleware
|
namespace DocumentService.API.Middleware
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Placeholder middleware for multi-tenancy resolution via X-API-Key header.
|
/// Placeholder middleware for multi-tenancy resolution via X-API-Key header.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# ?? DocumentOperator - Phasenplan (Feature-Driven Development)
|
# ?? DocumentService - Phasenplan (Feature-Driven Development)
|
||||||
|
|
||||||
> **Stand:** 17.01.2025 | **Aktuell:** Feature 3 - ExtractAttachments ? NEXT | **Projektdauer:** 6 Wochen
|
> **Stand:** 17.01.2025 | **Aktuell:** Feature 3 - ExtractAttachments ? NEXT | **Projektdauer:** 6 Wochen
|
||||||
|
|
||||||
@@ -132,7 +132,7 @@
|
|||||||
- ? XML Comments aktiviert
|
- ? XML Comments aktiviert
|
||||||
|
|
||||||
2. **XML-Dokumentation aktiviert**
|
2. **XML-Dokumentation aktiviert**
|
||||||
- ? `API/DocumentOperator.API.csproj`
|
- ? `API/DocumentService.API.csproj`
|
||||||
- ? `<GenerateDocumentationFile>true</GenerateDocumentationFile>`
|
- ? `<GenerateDocumentationFile>true</GenerateDocumentationFile>`
|
||||||
|
|
||||||
3. **Endpoint Dokumentation**
|
3. **Endpoint Dokumentation**
|
||||||
@@ -146,12 +146,12 @@
|
|||||||
|
|
||||||
5. **Program.cs Updates**
|
5. **Program.cs Updates**
|
||||||
- ? `builder.Services.AddSwaggerDocumentation()` statt `AddSwaggerGen()`
|
- ? `builder.Services.AddSwaggerDocumentation()` statt `AddSwaggerGen()`
|
||||||
- ? `using DocumentOperator.API.Configuration;` hinzugefügt
|
- ? `using DocumentService.API.Configuration;` hinzugefügt
|
||||||
|
|
||||||
**Akzeptanzkriterien:**
|
**Akzeptanzkriterien:**
|
||||||
- ? Build erfolgreich
|
- ? Build erfolgreich
|
||||||
- ? Alle Tests grün (11/11)
|
- ? Alle Tests grün (11/11)
|
||||||
- ? XML-Dokumentation wird generiert (`DocumentOperator.API.xml`)
|
- ? XML-Dokumentation wird generiert (`DocumentService.API.xml`)
|
||||||
- ? Swagger UI zeigt Endpoint `/api/v1/documents/validate` mit Dokumentation
|
- ? Swagger UI zeigt Endpoint `/api/v1/documents/validate` mit Dokumentation
|
||||||
- ? Request/Response-Schemas sind dokumentiert
|
- ? Request/Response-Schemas sind dokumentiert
|
||||||
- ? Endpoint ist im Swagger UI testbar
|
- ? Endpoint ist im Swagger UI testbar
|
||||||
|
|||||||
@@ -3,12 +3,12 @@ using Serilog.Ui.Core.Extensions;
|
|||||||
using Serilog.Ui.SqliteDataProvider.Extensions;
|
using Serilog.Ui.SqliteDataProvider.Extensions;
|
||||||
using Serilog.Ui.Web.Extensions;
|
using Serilog.Ui.Web.Extensions;
|
||||||
using Scalar.AspNetCore;
|
using Scalar.AspNetCore;
|
||||||
using DocumentOperator.Infrastructure.Configuration;
|
using DocumentService.Infrastructure.Configuration;
|
||||||
using DocumentOperator.Application;
|
using DocumentService.Application;
|
||||||
using DocumentOperator.Application.Common.Configuration;
|
using DocumentService.Application.Common.Configuration;
|
||||||
using DocumentOperator.Infrastructure;
|
using DocumentService.Infrastructure;
|
||||||
using DocumentOperator.API.Middleware;
|
using DocumentService.API.Middleware;
|
||||||
using DocumentOperator.API.Configuration;
|
using DocumentService.API.Configuration;
|
||||||
|
|
||||||
var builder = WebApplication.CreateBuilder(args);
|
var builder = WebApplication.CreateBuilder(args);
|
||||||
|
|
||||||
@@ -18,20 +18,20 @@ var builder = WebApplication.CreateBuilder(args);
|
|||||||
Log.Logger = new LoggerConfiguration()
|
Log.Logger = new LoggerConfiguration()
|
||||||
.ReadFrom.Configuration(builder.Configuration)
|
.ReadFrom.Configuration(builder.Configuration)
|
||||||
.Enrich.FromLogContext()
|
.Enrich.FromLogContext()
|
||||||
.Enrich.WithProperty("Application", "DocumentOperator")
|
.Enrich.WithProperty("Application", "DocumentService")
|
||||||
.CreateLogger();
|
.CreateLogger();
|
||||||
|
|
||||||
builder.Host.UseSerilog();
|
builder.Host.UseSerilog();
|
||||||
|
|
||||||
Log.Information("Starting DocumentOperator API...");
|
Log.Information("Starting DocumentService API...");
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// ========================================
|
// ========================================
|
||||||
// 2. Options Pattern Configuration
|
// 2. Options Pattern Configuration
|
||||||
// ========================================
|
// ========================================
|
||||||
builder.Services.Configure<DocumentOperatorSettings>(
|
builder.Services.Configure<DocumentServiceSettings>(
|
||||||
builder.Configuration.GetSection(DocumentOperatorSettings.SectionName));
|
builder.Configuration.GetSection(DocumentServiceSettings.SectionName));
|
||||||
|
|
||||||
builder.Services.Configure<ZugferdSettings>(
|
builder.Services.Configure<ZugferdSettings>(
|
||||||
builder.Configuration.GetSection("ZugferdSettings"));
|
builder.Configuration.GetSection("ZugferdSettings"));
|
||||||
@@ -125,7 +125,7 @@ try
|
|||||||
// ========================================
|
// ========================================
|
||||||
app.MapControllers(); // Maps all [ApiController] controllers
|
app.MapControllers(); // Maps all [ApiController] controllers
|
||||||
|
|
||||||
Log.Information("DocumentOperator API started successfully");
|
Log.Information("DocumentService API started successfully");
|
||||||
|
|
||||||
app.Run();
|
app.Run();
|
||||||
}
|
}
|
||||||
@@ -141,7 +141,7 @@ finally
|
|||||||
|
|
||||||
// Make Program class accessible for Integration Tests
|
// Make Program class accessible for Integration Tests
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Entry point class for the DocumentOperator API.
|
/// Entry point class for the DocumentService API.
|
||||||
/// Made partial and public for integration test access.
|
/// Made partial and public for integration test access.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class Program { }
|
public partial class Program { }
|
||||||
@@ -9,9 +9,9 @@
|
|||||||
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
|
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
|
||||||
<ExcludeApp_Data>false</ExcludeApp_Data>
|
<ExcludeApp_Data>false</ExcludeApp_Data>
|
||||||
<ProjectGuid>c60bc965-d293-ea64-b153-1941f0648df4</ProjectGuid>
|
<ProjectGuid>c60bc965-d293-ea64-b153-1941f0648df4</ProjectGuid>
|
||||||
<DesktopBuildPackageLocation>M:\App&Service\0 DD - Smart UP\DocumentOperator\PreRelease\API\net8\$(Version)\DocumentOperator.API.zip</DesktopBuildPackageLocation>
|
<DesktopBuildPackageLocation>M:\App&Service\0 DD - Smart UP\DocumentService\PreRelease\API\net8\$(Version)\DocumentService.API.zip</DesktopBuildPackageLocation>
|
||||||
<PackageAsSingleFile>true</PackageAsSingleFile>
|
<PackageAsSingleFile>true</PackageAsSingleFile>
|
||||||
<DeployIisAppPath>DocumentOperator.API</DeployIisAppPath>
|
<DeployIisAppPath>DocumentService.API</DeployIisAppPath>
|
||||||
<_TargetId>IISWebDeployPackage</_TargetId>
|
<_TargetId>IISWebDeployPackage</_TargetId>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# DocumentOperator API - Manual Testing Guide
|
# DocumentService API - Manual Testing Guide
|
||||||
|
|
||||||
This guide contains manual test scenarios for validating the DocumentOperator API endpoints using Swagger UI or tools like Postman.
|
This guide contains manual test scenarios for validating the DocumentService API endpoints using Swagger UI or tools like Postman.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -8,7 +8,7 @@ This guide contains manual test scenarios for validating the DocumentOperator AP
|
|||||||
|
|
||||||
1. **Start the API:**
|
1. **Start the API:**
|
||||||
```powershell
|
```powershell
|
||||||
dotnet run --project DocumentOperator.API
|
dotnet run --project DocumentService.API
|
||||||
```
|
```
|
||||||
Default URL: `https://localhost:5001` (check console output for actual port)
|
Default URL: `https://localhost:5001` (check console output for actual port)
|
||||||
|
|
||||||
|
|||||||
@@ -5,8 +5,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
"DocumentOperatorSettings": {
|
"DocumentServiceSettings": {
|
||||||
"TempFolderPath": "C:\\Temp\\DocumentOperator\\Dev",
|
"TempFolderPath": "C:\\Temp\\DocumentService\\Dev",
|
||||||
"EnableDetailedLogging": true
|
"EnableDetailedLogging": true
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -8,12 +8,12 @@
|
|||||||
"AllowedHosts": "*",
|
"AllowedHosts": "*",
|
||||||
|
|
||||||
"Application": {
|
"Application": {
|
||||||
"LogDirectory": "E:\\LogFiles\\Digital Data\\DocumentOperator.API"
|
"LogDirectory": "E:\\LogFiles\\Digital Data\\DocumentService.API"
|
||||||
},
|
},
|
||||||
|
|
||||||
"SwaggerSettings": {
|
"SwaggerSettings": {
|
||||||
"EnableInProduction": true,
|
"EnableInProduction": true,
|
||||||
"Title": "DocumentOperator API",
|
"Title": "DocumentService API",
|
||||||
"Version": "v1",
|
"Version": "v1",
|
||||||
"Description": "PDF document processing service using DevExpress"
|
"Description": "PDF document processing service using DevExpress"
|
||||||
},
|
},
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
{
|
{
|
||||||
"Name": "SQLite",
|
"Name": "SQLite",
|
||||||
"Args": {
|
"Args": {
|
||||||
"sqliteDbPath": "E:\\LogFiles\\Digital Data\\DocumentOperator.API\\logs.db",
|
"sqliteDbPath": "E:\\LogFiles\\Digital Data\\DocumentService.API\\logs.db",
|
||||||
"tableName": "Logs",
|
"tableName": "Logs",
|
||||||
"storeTimestampInUtc": true
|
"storeTimestampInUtc": true
|
||||||
}
|
}
|
||||||
@@ -54,8 +54,8 @@
|
|||||||
"Enrich": [ "FromLogContext", "WithMachineName", "WithThreadId" ]
|
"Enrich": [ "FromLogContext", "WithMachineName", "WithThreadId" ]
|
||||||
},
|
},
|
||||||
|
|
||||||
"DocumentOperatorSettings": {
|
"DocumentServiceSettings": {
|
||||||
"TempFolderPath": "C:\\Temp\\DocumentOperator",
|
"TempFolderPath": "C:\\Temp\\DocumentService",
|
||||||
"TempFileRetentionHours": 24,
|
"TempFileRetentionHours": 24,
|
||||||
"MaxPdfSizeMB": 50,
|
"MaxPdfSizeMB": 50,
|
||||||
"EnableDetailedLogging": true
|
"EnableDetailedLogging": true
|
||||||
@@ -79,7 +79,7 @@
|
|||||||
|
|
||||||
"RedisSettings": {
|
"RedisSettings": {
|
||||||
"ConnectionString": "localhost:6379",
|
"ConnectionString": "localhost:6379",
|
||||||
"InstanceName": "DocumentOperator:",
|
"InstanceName": "DocumentService:",
|
||||||
"CacheExpirationMinutes": 60
|
"CacheExpirationMinutes": 60
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
using DocumentOperator.Application.Common.Interfaces;
|
using DocumentService.Application.Common.Interfaces;
|
||||||
using DocumentOperator.Domain.Models.ValueObjects;
|
using DocumentService.Domain.Models.ValueObjects;
|
||||||
using FluentValidation;
|
using FluentValidation;
|
||||||
using MediatR;
|
using MediatR;
|
||||||
|
|
||||||
namespace DocumentOperator.Application.AddAnnotation;
|
namespace DocumentService.Application.AddAnnotation;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Command to add an annotation to a PDF document.
|
/// Command to add an annotation to a PDF document.
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
using DocumentOperator.Application.Common.Interfaces;
|
using DocumentService.Application.Common.Interfaces;
|
||||||
using FluentValidation;
|
using FluentValidation;
|
||||||
using MediatR;
|
using MediatR;
|
||||||
|
|
||||||
namespace DocumentOperator.Application.AddAttachments;
|
namespace DocumentService.Application.AddAttachments;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Command to add one or more attachments to a PDF document (supports PDF/A-3)
|
/// Command to add one or more attachments to a PDF document (supports PDF/A-3)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using FluentValidation;
|
using FluentValidation;
|
||||||
using MediatR;
|
using MediatR;
|
||||||
|
|
||||||
namespace DocumentOperator.Application.AddStamp;
|
namespace DocumentService.Application.AddStamp;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Command to add a stamp (text, image, or predefined) to PDF pages.
|
/// Command to add a stamp (text, image, or predefined) to PDF pages.
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
using AutoMapper;
|
using AutoMapper;
|
||||||
using DocumentOperator.Application.Common.DTOs;
|
using DocumentService.Application.Common.DTOs;
|
||||||
using DocumentOperator.Application.Common.Interfaces;
|
using DocumentService.Application.Common.Interfaces;
|
||||||
using MediatR;
|
using MediatR;
|
||||||
|
|
||||||
namespace DocumentOperator.Application.CheckPdfAttachments.Queries;
|
namespace DocumentService.Application.CheckPdfAttachments.Queries;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Query for checking PDF attachments (Stream-based)
|
/// Query for checking PDF attachments (Stream-based)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using FluentValidation;
|
using FluentValidation;
|
||||||
|
|
||||||
namespace DocumentOperator.Application.CheckPdfAttachments.Queries;
|
namespace DocumentService.Application.CheckPdfAttachments.Queries;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Validator for CheckPdfAttachmentsQuery
|
/// Validator for CheckPdfAttachmentsQuery
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ using MediatR;
|
|||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
|
||||||
namespace DocumentOperator.Application.Common.Behaviors;
|
namespace DocumentService.Application.Common.Behaviors;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// MediatR Pipeline Behavior that logs requests and tracks performance
|
/// MediatR Pipeline Behavior that logs requests and tracks performance
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using FluentValidation;
|
using FluentValidation;
|
||||||
using MediatR;
|
using MediatR;
|
||||||
|
|
||||||
namespace DocumentOperator.Application.Common.Behaviors;
|
namespace DocumentService.Application.Common.Behaviors;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// MediatR Pipeline Behavior that validates requests using FluentValidation
|
/// MediatR Pipeline Behavior that validates requests using FluentValidation
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace DocumentOperator.Application.Common.Configuration;
|
namespace DocumentService.Application.Common.Configuration;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Configuration settings for ZUGFeRD/Factur-X/XRechnung detection
|
/// Configuration settings for ZUGFeRD/Factur-X/XRechnung detection
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace DocumentOperator.Application.Common.DTOs;
|
namespace DocumentService.Application.Common.DTOs;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// DTO for attachment check result returned to API layer
|
/// DTO for attachment check result returned to API layer
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace DocumentOperator.Application.Common.DTOs;
|
namespace DocumentService.Application.Common.DTOs;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents complete attachment information for a PDF document.
|
/// Represents complete attachment information for a PDF document.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace DocumentOperator.Application.Common.DTOs;
|
namespace DocumentService.Application.Common.DTOs;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents metadata of a single PDF attachment (embedded file).
|
/// Represents metadata of a single PDF attachment (embedded file).
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace DocumentOperator.Application.Common.DTOs;
|
namespace DocumentService.Application.Common.DTOs;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// PDF/A validation metadata including conformance level and validation errors/warnings
|
/// PDF/A validation metadata including conformance level and validation errors/warnings
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace DocumentOperator.Application.Common.DTOs;
|
namespace DocumentService.Application.Common.DTOs;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// PDF/A validation result including conformance level and validation errors/warnings
|
/// PDF/A validation result including conformance level and validation errors/warnings
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace DocumentOperator.Application.Common.DTOs;
|
namespace DocumentService.Application.Common.DTOs;
|
||||||
|
|
||||||
public sealed class PdfMetadata(
|
public sealed class PdfMetadata(
|
||||||
int pageCount,
|
int pageCount,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace DocumentOperator.Application.Common.DTOs;
|
namespace DocumentService.Application.Common.DTOs;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Response mit PDF-Metadaten
|
/// Response mit PDF-Metadaten
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace DocumentOperator.Application.Common.DTOs;
|
namespace DocumentService.Application.Common.DTOs;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Swiss QR Bill data transfer object (mapped from Codecrete Bill)
|
/// Swiss QR Bill data transfer object (mapped from Codecrete Bill)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace DocumentOperator.Application.Common.DTOs;
|
namespace DocumentService.Application.Common.DTOs;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Response containing extracted Swiss QR Code in dual format.
|
/// Response containing extracted Swiss QR Code in dual format.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace DocumentOperator.Application.Common.DTOs;
|
namespace DocumentService.Application.Common.DTOs;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// DTO for ZUGFeRD check result
|
/// DTO for ZUGFeRD check result
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using DocumentOperator.Application.Common.DTOs;
|
using DocumentService.Application.Common.DTOs;
|
||||||
|
|
||||||
namespace DocumentOperator.Application.Common.Interfaces;
|
namespace DocumentService.Application.Common.Interfaces;
|
||||||
|
|
||||||
public interface IPdfProcessor
|
public interface IPdfProcessor
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using Codecrete.SwissQRBill.Generator;
|
using Codecrete.SwissQRBill.Generator;
|
||||||
|
|
||||||
namespace DocumentOperator.Application.Common.Interfaces;
|
namespace DocumentService.Application.Common.Interfaces;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Interface for Swiss QR Code processing operations.
|
/// Interface for Swiss QR Code processing operations.
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
using AutoMapper;
|
using AutoMapper;
|
||||||
using Codecrete.SwissQRBill.Generator;
|
using Codecrete.SwissQRBill.Generator;
|
||||||
using DocumentOperator.Application.Common.DTOs;
|
using DocumentService.Application.Common.DTOs;
|
||||||
using DocumentOperator.Domain.Models.ValueObjects;
|
using DocumentService.Domain.Models.ValueObjects;
|
||||||
|
|
||||||
namespace DocumentOperator.Application.Common.Mapping;
|
namespace DocumentService.Application.Common.Mapping;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// AutoMapper profile for mapping domain entities and external models to DTOs.
|
/// AutoMapper profile for mapping domain entities and external models to DTOs.
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
using DocumentOperator.Application.Common.Interfaces;
|
using DocumentService.Application.Common.Interfaces;
|
||||||
using FluentValidation;
|
using FluentValidation;
|
||||||
using MediatR;
|
using MediatR;
|
||||||
|
|
||||||
namespace DocumentOperator.Application.ConvertFromPdfA;
|
namespace DocumentService.Application.ConvertFromPdfA;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Command to convert a PDF/A document to a standard PDF (removes PDF/A restrictions)
|
/// Command to convert a PDF/A document to a standard PDF (removes PDF/A restrictions)
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
using DocumentOperator.Application.Common.Interfaces;
|
using DocumentService.Application.Common.Interfaces;
|
||||||
using FluentValidation;
|
using FluentValidation;
|
||||||
using MediatR;
|
using MediatR;
|
||||||
|
|
||||||
namespace DocumentOperator.Application.ConvertToPdfA;
|
namespace DocumentService.Application.ConvertToPdfA;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Command to convert a standard PDF to PDF/A format
|
/// Command to convert a standard PDF to PDF/A format
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ using FluentValidation;
|
|||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
|
||||||
namespace DocumentOperator.Application;
|
namespace DocumentService.Application;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Dependency Injection configuration for Application Layer
|
/// Dependency Injection configuration for Application Layer
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
using DocumentOperator.Application.Common.Interfaces;
|
using DocumentService.Application.Common.Interfaces;
|
||||||
using FluentValidation;
|
using FluentValidation;
|
||||||
using MediatR;
|
using MediatR;
|
||||||
|
|
||||||
namespace DocumentOperator.Application.ExtractPdfAttachments;
|
namespace DocumentService.Application.ExtractPdfAttachments;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Command to extract all embedded files from a PDF document and return as ZIP archive.
|
/// Command to extract all embedded files from a PDF document and return as ZIP archive.
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
using DocumentOperator.Application.Common.Configuration;
|
using DocumentService.Application.Common.Configuration;
|
||||||
using DocumentOperator.Application.Common.Interfaces;
|
using DocumentService.Application.Common.Interfaces;
|
||||||
using DocumentOperator.Domain.Common.Exceptions;
|
using DocumentService.Domain.Common.Exceptions;
|
||||||
using FluentValidation;
|
using FluentValidation;
|
||||||
using MediatR;
|
using MediatR;
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
|
|
||||||
namespace DocumentOperator.Application.ExtractZugferd;
|
namespace DocumentService.Application.ExtractZugferd;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Command to extract ZUGFeRD XML from a PDF document
|
/// Command to extract ZUGFeRD XML from a PDF document
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
using DocumentOperator.Application.Common.Configuration;
|
using DocumentService.Application.Common.Configuration;
|
||||||
using DocumentOperator.Application.Common.DTOs;
|
using DocumentService.Application.Common.DTOs;
|
||||||
using DocumentOperator.Application.Common.Interfaces;
|
using DocumentService.Application.Common.Interfaces;
|
||||||
using MediatR;
|
using MediatR;
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
|
|
||||||
namespace DocumentOperator.Application.HasZugferd.Queries;
|
namespace DocumentService.Application.HasZugferd.Queries;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Query for checking if PDF contains ZUGFeRD XML attachment
|
/// Query for checking if PDF contains ZUGFeRD XML attachment
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using FluentValidation;
|
using FluentValidation;
|
||||||
|
|
||||||
namespace DocumentOperator.Application.HasZugferd.Queries;
|
namespace DocumentService.Application.HasZugferd.Queries;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Validator for HasZugferdQuery
|
/// Validator for HasZugferdQuery
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
using DocumentOperator.Application.Common.Interfaces;
|
using DocumentService.Application.Common.Interfaces;
|
||||||
using FluentValidation;
|
using FluentValidation;
|
||||||
using MediatR;
|
using MediatR;
|
||||||
|
|
||||||
namespace DocumentOperator.Application.MergePdfs;
|
namespace DocumentService.Application.MergePdfs;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Command to merge multiple PDF documents into a single PDF.
|
/// Command to merge multiple PDF documents into a single PDF.
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
using AutoMapper;
|
using AutoMapper;
|
||||||
using DocumentOperator.Application.Common.DTOs;
|
using DocumentService.Application.Common.DTOs;
|
||||||
using DocumentOperator.Application.Common.Interfaces;
|
using DocumentService.Application.Common.Interfaces;
|
||||||
using MediatR;
|
using MediatR;
|
||||||
|
|
||||||
namespace DocumentOperator.Application.SwissQrCode.Queries;
|
namespace DocumentService.Application.SwissQrCode.Queries;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Query for extracting Swiss QR Code from PDF (Stream-based)
|
/// Query for extracting Swiss QR Code from PDF (Stream-based)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using DocumentOperator.Application.SwissQrCode.Queries;
|
using DocumentService.Application.SwissQrCode.Queries;
|
||||||
using FluentValidation;
|
using FluentValidation;
|
||||||
|
|
||||||
namespace DocumentOperator.Application.SwissQrCode.Queries;
|
namespace DocumentService.Application.SwissQrCode.Queries;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Validates ExtractSwissQrCodeQuery before handler execution.
|
/// Validates ExtractSwissQrCodeQuery before handler execution.
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
using AutoMapper;
|
using AutoMapper;
|
||||||
using DocumentOperator.Application.Common.DTOs;
|
using DocumentService.Application.Common.DTOs;
|
||||||
using DocumentOperator.Application.Common.Interfaces;
|
using DocumentService.Application.Common.Interfaces;
|
||||||
using MediatR;
|
using MediatR;
|
||||||
|
|
||||||
namespace DocumentOperator.Application.ValidatePdf.Queries;
|
namespace DocumentService.Application.ValidatePdf.Queries;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Query for PDF validation (Stream-based)
|
/// Query for PDF validation (Stream-based)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using DocumentOperator.Application.ValidatePdf.Queries;
|
using DocumentService.Application.ValidatePdf.Queries;
|
||||||
using FluentValidation;
|
using FluentValidation;
|
||||||
|
|
||||||
namespace DocumentOperator.Application.ValidatePdf.Queries;
|
namespace DocumentService.Application.ValidatePdf.Queries;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Validator for ValidatePdfQuery
|
/// Validator for ValidatePdfQuery
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
using AutoMapper;
|
using AutoMapper;
|
||||||
using DocumentOperator.Application.Common.DTOs;
|
using DocumentService.Application.Common.DTOs;
|
||||||
using DocumentOperator.Application.Common.Interfaces;
|
using DocumentService.Application.Common.Interfaces;
|
||||||
using MediatR;
|
using MediatR;
|
||||||
|
|
||||||
namespace DocumentOperator.Application.ValidatePdfA.Queries;
|
namespace DocumentService.Application.ValidatePdfA.Queries;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Query for PDF/A validation (Stream-based)
|
/// Query for PDF/A validation (Stream-based)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using FluentValidation;
|
using FluentValidation;
|
||||||
|
|
||||||
namespace DocumentOperator.Application.ValidatePdfA.Validators;
|
namespace DocumentService.Application.ValidatePdfA.Validators;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Validator for ValidatePdfAQuery
|
/// Validator for ValidatePdfAQuery
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ using System.Runtime.Serialization;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace DocumentOperator.Domain.Common.Exceptions;
|
namespace DocumentService.Domain.Common.Exceptions;
|
||||||
|
|
||||||
public class BadRequestException : Exception
|
public class BadRequestException : Exception
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace DocumentOperator.Domain.Common.Exceptions;
|
namespace DocumentService.Domain.Common.Exceptions;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Base exception for all domain-related exceptions.
|
/// Base exception for all domain-related exceptions.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace DocumentOperator.Domain.Common.Exceptions;
|
namespace DocumentService.Domain.Common.Exceptions;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Exception thrown when domain validation fails (e.g., invalid Value Objects).
|
/// Exception thrown when domain validation fails (e.g., invalid Value Objects).
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using System.Runtime.Serialization;
|
using System.Runtime.Serialization;
|
||||||
|
|
||||||
namespace DocumentOperator.Domain.Common.Exceptions;
|
namespace DocumentService.Domain.Common.Exceptions;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Exception thrown when a requested resource is not found.
|
/// Exception thrown when a requested resource is not found.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace DocumentOperator.Domain.Models.ValueObjects;
|
namespace DocumentService.Domain.Models.ValueObjects;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Coordinate origin point for PDF annotations.
|
/// Coordinate origin point for PDF annotations.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace DocumentOperator.Domain.Models.ValueObjects;
|
namespace DocumentService.Domain.Models.ValueObjects;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Supported PDF annotation types
|
/// Supported PDF annotation types
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace DocumentOperator.Domain.Models.ValueObjects;
|
namespace DocumentService.Domain.Models.ValueObjects;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Predefined stamp types with standard text and styling.
|
/// Predefined stamp types with standard text and styling.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace DocumentOperator.Domain.Models.ValueObjects;
|
namespace DocumentService.Domain.Models.ValueObjects;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Specifies whether the stamp should appear in the foreground (on top of content) or background (behind content).
|
/// Specifies whether the stamp should appear in the foreground (on top of content) or background (behind content).
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace DocumentOperator.Domain.Models.ValueObjects;
|
namespace DocumentService.Domain.Models.ValueObjects;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Specifies the type of stamp to add to a PDF document.
|
/// Specifies the type of stamp to add to a PDF document.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace DocumentOperator.Domain.Models.ValueObjects;
|
namespace DocumentService.Domain.Models.ValueObjects;
|
||||||
|
|
||||||
public sealed class TenantId
|
public sealed class TenantId
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace DocumentOperator.Domain.Models.ValueObjects;
|
namespace DocumentService.Domain.Models.ValueObjects;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Text markup annotation style (highlight, underline, strikeout)
|
/// Text markup annotation style (highlight, underline, strikeout)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace DocumentOperator.Infrastructure.Configuration;
|
namespace DocumentService.Infrastructure.Configuration;
|
||||||
|
|
||||||
public class ApiKeySettings
|
public class ApiKeySettings
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
namespace DocumentOperator.Infrastructure.Configuration;
|
namespace DocumentService.Infrastructure.Configuration;
|
||||||
|
|
||||||
public class DocumentOperatorSettings
|
public class DocumentServiceSettings
|
||||||
{
|
{
|
||||||
public const string SectionName = "DocumentOperatorSettings";
|
public const string SectionName = "DocumentServiceSettings";
|
||||||
|
|
||||||
public string TempFolderPath { get; set; } = string.Empty;
|
public string TempFolderPath { get; set; } = string.Empty;
|
||||||
public int TempFileRetentionHours { get; set; }
|
public int TempFileRetentionHours { get; set; }
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
namespace DocumentOperator.Infrastructure.Configuration;
|
namespace DocumentService.Infrastructure.Configuration;
|
||||||
|
|
||||||
public class RedisSettings
|
public class RedisSettings
|
||||||
{
|
{
|
||||||
public const string SectionName = "RedisSettings";
|
public const string SectionName = "RedisSettings";
|
||||||
|
|
||||||
public string ConnectionString { get; set; } = "localhost:6379";
|
public string ConnectionString { get; set; } = "localhost:6379";
|
||||||
public string InstanceName { get; set; } = "DocumentOperator:";
|
public string InstanceName { get; set; } = "DocumentService:";
|
||||||
public int CacheExpirationMinutes { get; set; } = 60;
|
public int CacheExpirationMinutes { get; set; } = 60;
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace DocumentOperator.Infrastructure.Configuration;
|
namespace DocumentService.Infrastructure.Configuration;
|
||||||
|
|
||||||
public class TenantInfo
|
public class TenantInfo
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
using DocumentOperator.Application.Common.Interfaces;
|
using DocumentService.Application.Common.Interfaces;
|
||||||
using DocumentOperator.Infrastructure.Services.PdfProcessing;
|
using DocumentService.Infrastructure.Services.PdfProcessing;
|
||||||
using DocumentOperator.Infrastructure.Services.QrCodeProcessing;
|
using DocumentService.Infrastructure.Services.QrCodeProcessing;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
|
||||||
namespace DocumentOperator.Infrastructure;
|
namespace DocumentService.Infrastructure;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Dependency Injection configuration for Infrastructure Layer
|
/// Dependency Injection configuration for Infrastructure Layer
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
using DevExpress.Pdf;
|
using DevExpress.Pdf;
|
||||||
using DevExpress.Drawing;
|
using DevExpress.Drawing;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using DocumentOperator.Application.Common.DTOs;
|
using DocumentService.Application.Common.DTOs;
|
||||||
using DocumentOperator.Application.Common.Interfaces;
|
using DocumentService.Application.Common.Interfaces;
|
||||||
using DocumentOperator.Domain.Common.Exceptions;
|
using DocumentService.Domain.Common.Exceptions;
|
||||||
|
|
||||||
namespace DocumentOperator.Infrastructure.Services.PdfProcessing;
|
namespace DocumentService.Infrastructure.Services.PdfProcessing;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// PDF processor implementation using DevExpress.Pdf library.
|
/// PDF processor implementation using DevExpress.Pdf library.
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
using Codecrete.SwissQRBill.Generator;
|
using Codecrete.SwissQRBill.Generator;
|
||||||
using DevExpress.Drawing;
|
using DevExpress.Drawing;
|
||||||
using DevExpress.Pdf;
|
using DevExpress.Pdf;
|
||||||
using DocumentOperator.Application.Common.Interfaces;
|
using DocumentService.Application.Common.Interfaces;
|
||||||
using DocumentOperator.Domain.Common.Exceptions;
|
using DocumentService.Domain.Common.Exceptions;
|
||||||
using SkiaSharp;
|
using SkiaSharp;
|
||||||
using SkiaSharp.QrCode;
|
using SkiaSharp.QrCode;
|
||||||
using System.Collections.Concurrent;
|
using System.Collections.Concurrent;
|
||||||
|
|
||||||
namespace DocumentOperator.Infrastructure.Services.QrCodeProcessing;
|
namespace DocumentService.Infrastructure.Services.QrCodeProcessing;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Swiss QR Code processor using DevExpress PDF API for image extraction,
|
/// Swiss QR Code processor using DevExpress PDF API for image extraction,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using System.Xml.Serialization;
|
using System.Xml.Serialization;
|
||||||
|
|
||||||
namespace DocumentOperator.Infrastructure.Services;
|
namespace DocumentService.Infrastructure.Services;
|
||||||
|
|
||||||
public static class StringExtensions
|
public static class StringExtensions
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
using DocumentOperator.API.Controllers; // For ExtractSwissQrCodeBase64Request DTO
|
using DocumentService.API.Controllers; // For ExtractSwissQrCodeBase64Request DTO
|
||||||
using DocumentOperator.Application.Common.DTOs;
|
using DocumentService.Application.Common.DTOs;
|
||||||
using FluentAssertions;
|
using FluentAssertions;
|
||||||
using Microsoft.AspNetCore.Mvc.Testing;
|
using Microsoft.AspNetCore.Mvc.Testing;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
@@ -7,7 +7,7 @@ using System.Net.Http.Json;
|
|||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using Xunit;
|
using Xunit;
|
||||||
|
|
||||||
namespace DocumentOperator.Tests.Integration.API;
|
namespace DocumentService.Tests.Integration.API;
|
||||||
|
|
||||||
public sealed class ExtractSwissQrCodeEndpointTests : IClassFixture<WebApplicationFactory<Program>>
|
public sealed class ExtractSwissQrCodeEndpointTests : IClassFixture<WebApplicationFactory<Program>>
|
||||||
{
|
{
|
||||||
@@ -27,7 +27,7 @@ public sealed class ExtractSwissQrCodeEndpointTests : IClassFixture<WebApplicati
|
|||||||
public async Task POST_ExtractSwissQrCode_ValidRequest_Returns200()
|
public async Task POST_ExtractSwissQrCode_ValidRequest_Returns200()
|
||||||
{
|
{
|
||||||
// Arrange
|
// Arrange
|
||||||
var validPdfBase64 = GetEmbeddedResourceAsBase64("DocumentOperator.Tests.TestData.Pdfs.valid.pdf");
|
var validPdfBase64 = GetEmbeddedResourceAsBase64("DocumentService.Tests.TestData.Pdfs.valid.pdf");
|
||||||
|
|
||||||
var request = new ExtractSwissQrCodeBase64Request
|
var request = new ExtractSwissQrCodeBase64Request
|
||||||
{
|
{
|
||||||
@@ -77,7 +77,7 @@ public sealed class ExtractSwissQrCodeEndpointTests : IClassFixture<WebApplicati
|
|||||||
{
|
{
|
||||||
// Arrange: References are OPTIONAL - null should not cause validation error (400)
|
// Arrange: References are OPTIONAL - null should not cause validation error (400)
|
||||||
// Using pdfWithSwissQRCode.pdf which actually has a QR code, so we get 200
|
// Using pdfWithSwissQRCode.pdf which actually has a QR code, so we get 200
|
||||||
var validPdfBase64 = GetEmbeddedResourceAsBase64("DocumentOperator.Tests.TestData.Pdfs.pdfWithSwissQRCode.pdf");
|
var validPdfBase64 = GetEmbeddedResourceAsBase64("DocumentService.Tests.TestData.Pdfs.pdfWithSwissQRCode.pdf");
|
||||||
|
|
||||||
var request = new
|
var request = new
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
using DocumentOperator.API.Controllers; // For CheckPdfAttachmentsRequest DTO
|
using DocumentService.API.Controllers; // For CheckPdfAttachmentsRequest DTO
|
||||||
using DocumentOperator.Application.Common.DTOs;
|
using DocumentService.Application.Common.DTOs;
|
||||||
using FluentAssertions;
|
using FluentAssertions;
|
||||||
using Microsoft.AspNetCore.Mvc.Testing;
|
using Microsoft.AspNetCore.Mvc.Testing;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Net.Http.Json;
|
using System.Net.Http.Json;
|
||||||
using Xunit;
|
using Xunit;
|
||||||
|
|
||||||
namespace DocumentOperator.Tests.Integration.API;
|
namespace DocumentService.Tests.Integration.API;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Integration tests for PdfAttachmentController.
|
/// Integration tests for PdfAttachmentController.
|
||||||
@@ -31,7 +31,7 @@ public class PdfAttachmentControllerTests : IClassFixture<WebApplicationFactory<
|
|||||||
private static async Task<byte[]> LoadTestPdfAsync(string filename)
|
private static async Task<byte[]> LoadTestPdfAsync(string filename)
|
||||||
{
|
{
|
||||||
var assembly = typeof(PdfAttachmentControllerTests).Assembly;
|
var assembly = typeof(PdfAttachmentControllerTests).Assembly;
|
||||||
var resourceName = $"DocumentOperator.Tests.TestData.Pdfs.{filename}";
|
var resourceName = $"DocumentService.Tests.TestData.Pdfs.{filename}";
|
||||||
|
|
||||||
using var stream = assembly.GetManifestResourceStream(resourceName);
|
using var stream = assembly.GetManifestResourceStream(resourceName);
|
||||||
if (stream == null)
|
if (stream == null)
|
||||||
|
|||||||
@@ -3,12 +3,12 @@ using System.Net.Http.Headers;
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using DocumentOperator.API.Controllers;
|
using DocumentService.API.Controllers;
|
||||||
using DocumentOperator.Domain.Models.ValueObjects;
|
using DocumentService.Domain.Models.ValueObjects;
|
||||||
using FluentAssertions;
|
using FluentAssertions;
|
||||||
using Microsoft.AspNetCore.Mvc.Testing;
|
using Microsoft.AspNetCore.Mvc.Testing;
|
||||||
|
|
||||||
namespace DocumentOperator.Tests.Integration.API;
|
namespace DocumentService.Tests.Integration.API;
|
||||||
|
|
||||||
public class PdfOperationsControllerTests : IClassFixture<WebApplicationFactory<Program>>
|
public class PdfOperationsControllerTests : IClassFixture<WebApplicationFactory<Program>>
|
||||||
{
|
{
|
||||||
@@ -22,7 +22,7 @@ public class PdfOperationsControllerTests : IClassFixture<WebApplicationFactory<
|
|||||||
private static Stream LoadTestPdfAsStream(string fileName)
|
private static Stream LoadTestPdfAsStream(string fileName)
|
||||||
{
|
{
|
||||||
var assembly = Assembly.GetExecutingAssembly();
|
var assembly = Assembly.GetExecutingAssembly();
|
||||||
var resourceName = $"DocumentOperator.Tests.TestData.Pdfs.{fileName}";
|
var resourceName = $"DocumentService.Tests.TestData.Pdfs.{fileName}";
|
||||||
return assembly.GetManifestResourceStream(resourceName)
|
return assembly.GetManifestResourceStream(resourceName)
|
||||||
?? throw new FileNotFoundException($"Embedded resource not found: {resourceName}");
|
?? throw new FileNotFoundException($"Embedded resource not found: {resourceName}");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
using DocumentOperator.API.Controllers; // For Base64Request DTOs
|
using DocumentService.API.Controllers; // For Base64Request DTOs
|
||||||
using DocumentOperator.Application.Common.DTOs;
|
using DocumentService.Application.Common.DTOs;
|
||||||
using FluentAssertions;
|
using FluentAssertions;
|
||||||
using Microsoft.AspNetCore.Mvc.Testing;
|
using Microsoft.AspNetCore.Mvc.Testing;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Net.Http.Json;
|
using System.Net.Http.Json;
|
||||||
using Xunit;
|
using Xunit;
|
||||||
|
|
||||||
namespace DocumentOperator.Tests.Integration.API;
|
namespace DocumentService.Tests.Integration.API;
|
||||||
|
|
||||||
public class PdfValidationControllerTests : IClassFixture<WebApplicationFactory<Program>>
|
public class PdfValidationControllerTests : IClassFixture<WebApplicationFactory<Program>>
|
||||||
{
|
{
|
||||||
@@ -27,7 +27,7 @@ public class PdfValidationControllerTests : IClassFixture<WebApplicationFactory<
|
|||||||
// Arrange
|
// Arrange
|
||||||
// Verwende ein echtes Test-PDF (embedded resource aus Unit Tests)
|
// Verwende ein echtes Test-PDF (embedded resource aus Unit Tests)
|
||||||
var assembly = typeof(PdfValidationControllerTests).Assembly;
|
var assembly = typeof(PdfValidationControllerTests).Assembly;
|
||||||
var resourceName = "DocumentOperator.Tests.TestData.Pdfs.valid.pdf";
|
var resourceName = "DocumentService.Tests.TestData.Pdfs.valid.pdf";
|
||||||
|
|
||||||
byte[] pdfBytes;
|
byte[] pdfBytes;
|
||||||
using (var stream = assembly.GetManifestResourceStream(resourceName))
|
using (var stream = assembly.GetManifestResourceStream(resourceName))
|
||||||
@@ -101,7 +101,7 @@ public class PdfValidationControllerTests : IClassFixture<WebApplicationFactory<
|
|||||||
{
|
{
|
||||||
// Arrange
|
// Arrange
|
||||||
var assembly = typeof(PdfValidationControllerTests).Assembly;
|
var assembly = typeof(PdfValidationControllerTests).Assembly;
|
||||||
var resourceName = "DocumentOperator.Tests.TestData.Pdfs.valid.pdf";
|
var resourceName = "DocumentService.Tests.TestData.Pdfs.valid.pdf";
|
||||||
|
|
||||||
byte[] pdfBytes;
|
byte[] pdfBytes;
|
||||||
using (var stream = assembly.GetManifestResourceStream(resourceName))
|
using (var stream = assembly.GetManifestResourceStream(resourceName))
|
||||||
@@ -176,7 +176,7 @@ public class PdfValidationControllerTests : IClassFixture<WebApplicationFactory<
|
|||||||
{
|
{
|
||||||
// Arrange
|
// Arrange
|
||||||
var assembly = typeof(PdfValidationControllerTests).Assembly;
|
var assembly = typeof(PdfValidationControllerTests).Assembly;
|
||||||
var resourceName = "DocumentOperator.Tests.TestData.Pdfs.valid.pdf";
|
var resourceName = "DocumentService.Tests.TestData.Pdfs.valid.pdf";
|
||||||
|
|
||||||
byte[] pdfBytes;
|
byte[] pdfBytes;
|
||||||
using (var stream = assembly.GetManifestResourceStream(resourceName))
|
using (var stream = assembly.GetManifestResourceStream(resourceName))
|
||||||
@@ -250,7 +250,7 @@ public class PdfValidationControllerTests : IClassFixture<WebApplicationFactory<
|
|||||||
{
|
{
|
||||||
// Arrange
|
// Arrange
|
||||||
var assembly = typeof(PdfValidationControllerTests).Assembly;
|
var assembly = typeof(PdfValidationControllerTests).Assembly;
|
||||||
var resourceName = "DocumentOperator.Tests.TestData.Pdfs.valid.pdf";
|
var resourceName = "DocumentService.Tests.TestData.Pdfs.valid.pdf";
|
||||||
|
|
||||||
byte[] pdfBytes;
|
byte[] pdfBytes;
|
||||||
using (var stream = assembly.GetManifestResourceStream(resourceName))
|
using (var stream = assembly.GetManifestResourceStream(resourceName))
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
using AutoMapper;
|
using AutoMapper;
|
||||||
using DocumentOperator.Application.CheckPdfAttachments.Queries;
|
using DocumentService.Application.CheckPdfAttachments.Queries;
|
||||||
using DocumentOperator.Application.Common.DTOs;
|
using DocumentService.Application.Common.DTOs;
|
||||||
using DocumentOperator.Application.Common.Interfaces;
|
using DocumentService.Application.Common.Interfaces;
|
||||||
|
|
||||||
using FluentAssertions;
|
using FluentAssertions;
|
||||||
using Moq;
|
using Moq;
|
||||||
|
|
||||||
namespace DocumentOperator.Tests.Unit.Application.CheckPdfAttachments;
|
namespace DocumentService.Tests.Unit.Application.CheckPdfAttachments;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Unit tests for CheckPdfAttachmentsQueryHandler.
|
/// Unit tests for CheckPdfAttachmentsQueryHandler.
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
using AutoMapper;
|
using AutoMapper;
|
||||||
using DocumentOperator.Application.Common.DTOs;
|
using DocumentService.Application.Common.DTOs;
|
||||||
using DocumentOperator.Application.Common.Interfaces;
|
using DocumentService.Application.Common.Interfaces;
|
||||||
using DocumentOperator.Application.ValidatePdf.Queries;
|
using DocumentService.Application.ValidatePdf.Queries;
|
||||||
using DocumentOperator.Domain.Common.Exceptions;
|
using DocumentService.Domain.Common.Exceptions;
|
||||||
using FluentAssertions;
|
using FluentAssertions;
|
||||||
using Moq;
|
using Moq;
|
||||||
using Xunit;
|
using Xunit;
|
||||||
|
|
||||||
namespace DocumentOperator.Tests.Unit.Application.Features.ValidatePdf;
|
namespace DocumentService.Tests.Unit.Application.Features.ValidatePdf;
|
||||||
|
|
||||||
public class ValidatePdfHandlerTests
|
public class ValidatePdfHandlerTests
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
using AutoMapper;
|
using AutoMapper;
|
||||||
using DocumentOperator.Application.Common.DTOs;
|
using DocumentService.Application.Common.DTOs;
|
||||||
using DocumentOperator.Application.Common.Interfaces;
|
using DocumentService.Application.Common.Interfaces;
|
||||||
using DocumentOperator.Application.ValidatePdfA.Queries;
|
using DocumentService.Application.ValidatePdfA.Queries;
|
||||||
using DocumentOperator.Domain.Common.Exceptions;
|
using DocumentService.Domain.Common.Exceptions;
|
||||||
|
|
||||||
using FluentAssertions;
|
using FluentAssertions;
|
||||||
using Moq;
|
using Moq;
|
||||||
using Xunit;
|
using Xunit;
|
||||||
|
|
||||||
namespace DocumentOperator.Tests.Unit.Application.Features.ValidatePdfA;
|
namespace DocumentService.Tests.Unit.Application.Features.ValidatePdfA;
|
||||||
|
|
||||||
public class ValidatePdfAQueryHandlerTests
|
public class ValidatePdfAQueryHandlerTests
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using DocumentOperator.Application.Common.DTOs;
|
using DocumentService.Application.Common.DTOs;
|
||||||
using DocumentOperator.Application.Common.Interfaces;
|
using DocumentService.Application.Common.Interfaces;
|
||||||
using DocumentOperator.Domain.Common.Exceptions;
|
using DocumentService.Domain.Common.Exceptions;
|
||||||
using DocumentOperator.Infrastructure.Services.PdfProcessing;
|
using DocumentService.Infrastructure.Services.PdfProcessing;
|
||||||
using FluentAssertions;
|
using FluentAssertions;
|
||||||
|
|
||||||
namespace DocumentOperator.Tests.Unit.Infrastructure.Services.PdfProcessing;
|
namespace DocumentService.Tests.Unit.Infrastructure.Services.PdfProcessing;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Unit tests for DevExpressPdfProcessor.
|
/// Unit tests for DevExpressPdfProcessor.
|
||||||
@@ -31,7 +31,7 @@ public class DevExpressPdfProcessorTests
|
|||||||
private static byte[] LoadTestPdf(string filename)
|
private static byte[] LoadTestPdf(string filename)
|
||||||
{
|
{
|
||||||
var assembly = Assembly.GetExecutingAssembly();
|
var assembly = Assembly.GetExecutingAssembly();
|
||||||
var resourceName = $"DocumentOperator.Tests.TestData.Pdfs.{filename}";
|
var resourceName = $"DocumentService.Tests.TestData.Pdfs.{filename}";
|
||||||
|
|
||||||
using var stream = assembly.GetManifestResourceStream(resourceName);
|
using var stream = assembly.GetManifestResourceStream(resourceName);
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using DocumentOperator.Application.Common.Interfaces;
|
using DocumentService.Application.Common.Interfaces;
|
||||||
using DocumentOperator.Domain.Common.Exceptions;
|
using DocumentService.Domain.Common.Exceptions;
|
||||||
using DocumentOperator.Infrastructure.Services.QrCodeProcessing;
|
using DocumentService.Infrastructure.Services.QrCodeProcessing;
|
||||||
using FluentAssertions;
|
using FluentAssertions;
|
||||||
|
|
||||||
namespace DocumentOperator.Tests.Unit.Infrastructure.Services.QrCodeProcessing;
|
namespace DocumentService.Tests.Unit.Infrastructure.Services.QrCodeProcessing;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Unit tests for DevExpressSwissQrCodeProcessor.
|
/// Unit tests for DevExpressSwissQrCodeProcessor.
|
||||||
@@ -30,7 +30,7 @@ public class DevExpressSwissQrCodeProcessorTests
|
|||||||
private static Stream LoadTestPdf(string filename)
|
private static Stream LoadTestPdf(string filename)
|
||||||
{
|
{
|
||||||
var assembly = Assembly.GetExecutingAssembly();
|
var assembly = Assembly.GetExecutingAssembly();
|
||||||
var resourceName = $"DocumentOperator.Tests.TestData.Pdfs.{filename}";
|
var resourceName = $"DocumentService.Tests.TestData.Pdfs.{filename}";
|
||||||
|
|
||||||
var stream = assembly.GetManifestResourceStream(resourceName);
|
var stream = assembly.GetManifestResourceStream(resourceName);
|
||||||
|
|
||||||
|
|||||||
85
DocumentService.sln
Normal file
85
DocumentService.sln
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio Version 17
|
||||||
|
VisualStudioVersion = 17.14.37328.6
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DocumentService.API", "DocumentOperator.API\DocumentService.API.csproj", "{BA41F6A2-EE29-48F9-A3CB-29A05E57CF30}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DocumentService.Application", "DocumentOperator.Application\DocumentService.Application.csproj", "{B2B735FC-5F39-4CFF-9C54-C4F8820880B6}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DocumentService.Infrastructure", "DocumentOperator.Infrastructure\DocumentService.Infrastructure.csproj", "{C4CA19A8-8168-453B-B4ED-77E032CFE52E}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DocumentService.Domain", "DocumentOperator.Domain\DocumentService.Domain.csproj", "{B4C1C3ED-D3E8-4272-8704-2E73CEA6A0DD}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DocumentService.Tests", "DocumentOperator.Tests\DocumentService.Tests.csproj", "{32D2E997-3DA7-4061-8A50-DBB34BBC3E5A}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{3F9E8D8E-1234-4567-89AB-CDEF01234567}"
|
||||||
|
ProjectSection(SolutionItems) = preProject
|
||||||
|
AGENTS.md = AGENTS.md
|
||||||
|
CONTROLLER_ENDPOINTS.md = CONTROLLER_ENDPOINTS.md
|
||||||
|
REQUIRED_FEATURES.md = REQUIRED_FEATURES.md
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "fake-pfd", "fake-pfd", "{02EA681E-C7D8-13C7-8484-4AC65E1B71E8}"
|
||||||
|
ProjectSection(SolutionItems) = preProject
|
||||||
|
fake-pdf\form.pdf = fake-pdf\form.pdf
|
||||||
|
fake-pdf\multi-page.pdf = fake-pdf\multi-page.pdf
|
||||||
|
fake-pdf\one-page.pdf = fake-pdf\one-page.pdf
|
||||||
|
fake-pdf\with-image.pdf = fake-pdf\with-image.pdf
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "core", "core", "{0B80DDC4-A13C-4C5F-8520-AA2F3650E884}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "presentation", "presentation", "{62E8F4B3-EA49-41D2-8843-0636EB4421BB}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "infrastructure", "infrastructure", "{9BACC18A-5C6D-4678-A43C-A19907AE9CF3}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{2B18D2F8-40C1-4CA0-99AB-7F98F254FEB8}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{D64772B8-6213-4031-8064-2567F1E724F6}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{BA41F6A2-EE29-48F9-A3CB-29A05E57CF30}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{BA41F6A2-EE29-48F9-A3CB-29A05E57CF30}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{BA41F6A2-EE29-48F9-A3CB-29A05E57CF30}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{BA41F6A2-EE29-48F9-A3CB-29A05E57CF30}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{B2B735FC-5F39-4CFF-9C54-C4F8820880B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{B2B735FC-5F39-4CFF-9C54-C4F8820880B6}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{B2B735FC-5F39-4CFF-9C54-C4F8820880B6}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{B2B735FC-5F39-4CFF-9C54-C4F8820880B6}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{C4CA19A8-8168-453B-B4ED-77E032CFE52E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{C4CA19A8-8168-453B-B4ED-77E032CFE52E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{C4CA19A8-8168-453B-B4ED-77E032CFE52E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{C4CA19A8-8168-453B-B4ED-77E032CFE52E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{B4C1C3ED-D3E8-4272-8704-2E73CEA6A0DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{B4C1C3ED-D3E8-4272-8704-2E73CEA6A0DD}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{B4C1C3ED-D3E8-4272-8704-2E73CEA6A0DD}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{B4C1C3ED-D3E8-4272-8704-2E73CEA6A0DD}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{32D2E997-3DA7-4061-8A50-DBB34BBC3E5A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{32D2E997-3DA7-4061-8A50-DBB34BBC3E5A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{32D2E997-3DA7-4061-8A50-DBB34BBC3E5A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{32D2E997-3DA7-4061-8A50-DBB34BBC3E5A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(NestedProjects) = preSolution
|
||||||
|
{BA41F6A2-EE29-48F9-A3CB-29A05E57CF30} = {62E8F4B3-EA49-41D2-8843-0636EB4421BB}
|
||||||
|
{B2B735FC-5F39-4CFF-9C54-C4F8820880B6} = {0B80DDC4-A13C-4C5F-8520-AA2F3650E884}
|
||||||
|
{C4CA19A8-8168-453B-B4ED-77E032CFE52E} = {9BACC18A-5C6D-4678-A43C-A19907AE9CF3}
|
||||||
|
{B4C1C3ED-D3E8-4272-8704-2E73CEA6A0DD} = {0B80DDC4-A13C-4C5F-8520-AA2F3650E884}
|
||||||
|
{32D2E997-3DA7-4061-8A50-DBB34BBC3E5A} = {D64772B8-6213-4031-8064-2567F1E724F6}
|
||||||
|
{02EA681E-C7D8-13C7-8484-4AC65E1B71E8} = {3F9E8D8E-1234-4567-89AB-CDEF01234567}
|
||||||
|
{0B80DDC4-A13C-4C5F-8520-AA2F3650E884} = {2B18D2F8-40C1-4CA0-99AB-7F98F254FEB8}
|
||||||
|
{62E8F4B3-EA49-41D2-8843-0636EB4421BB} = {2B18D2F8-40C1-4CA0-99AB-7F98F254FEB8}
|
||||||
|
{9BACC18A-5C6D-4678-A43C-A19907AE9CF3} = {2B18D2F8-40C1-4CA0-99AB-7F98F254FEB8}
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
SolutionGuid = {832CA90A-06D6-4312-9B35-16CC665EB37C}
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# DocumentOperator - Required Functions and Features
|
# DocumentService - Required Functions and Features
|
||||||
|
|
||||||
**Project:** DocumentService (DOC)
|
**Project:** DocumentService (DOC)
|
||||||
**Ticket:** DOC-1 - GDPicture and Nutrient Replacing
|
**Ticket:** DOC-1 - GDPicture and Nutrient Replacing
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
This document describes in detail all PDF processing functions that the DocumentOperator service must implement. These functions will be implemented using the DevExpress Office File API as a replacement for the GDPicture and Nutrient libraries.
|
This document describes in detail all PDF processing functions that the DocumentService service must implement. These functions will be implemented using the DevExpress Office File API as a replacement for the GDPicture and Nutrient libraries.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -548,7 +548,7 @@ Body: {
|
|||||||
- **DevExpress PDF API Documentation:** https://docs.devexpress.com/OfficeFileAPI/
|
- **DevExpress PDF API Documentation:** https://docs.devexpress.com/OfficeFileAPI/
|
||||||
- **PDF/A Standard:** ISO 19005
|
- **PDF/A Standard:** ISO 19005
|
||||||
- **ZUGFeRD Standard:** https://www.ferd-net.de/
|
- **ZUGFeRD Standard:** https://www.ferd-net.de/
|
||||||
- **Ticket:** DOC-1 (M:\Austausch\DocumentOperator)
|
- **Ticket:** DOC-1 (M:\Austausch\DocumentService)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user