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
|
||||
|
||||
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
|
||||
|
||||
**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 44: Add `builder.Services.AddControllers()`
|
||||
- All DTOs → Support **BOTH** `IFormFile` (multipart) AND `Base64String` (JSON)
|
||||
@@ -195,7 +195,7 @@ dotnet test
|
||||
|
||||
**Run API (Development):**
|
||||
```powershell
|
||||
dotnet run --project DocumentOperator.API
|
||||
dotnet run --project DocumentService.API
|
||||
```
|
||||
Swagger UI: `https://localhost:7186/swagger`
|
||||
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:
|
||||
```csharp
|
||||
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>`.
|
||||
@@ -351,7 +351,7 @@ var stream = Assembly.GetExecutingAssembly()
|
||||
**3-folder structure (CORRECT approach by previous developer):**
|
||||
|
||||
```
|
||||
DocumentOperator.Tests/
|
||||
DocumentService.Tests/
|
||||
├── Integration/
|
||||
│ └── API/
|
||||
│ ├── PdfValidationControllerTests.cs (13 tests)
|
||||
@@ -520,7 +520,7 @@ public async Task<IActionResult> Validate([FromForm] PdfInputModel input, Cancel
|
||||
## Configuration
|
||||
|
||||
**appsettings.json sections:**
|
||||
- `DocumentOperatorSettings` (future: file size limits, temp paths)
|
||||
- `DocumentServiceSettings` (future: file size limits, temp paths)
|
||||
- `RedisSettings` (future: multi-tenancy caching)
|
||||
- `ApiKeySettings` (future: authentication)
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# DocumentOperator - Controller & Endpoint Specification
|
||||
# DocumentService - Controller & Endpoint Specification
|
||||
|
||||
**Project:** DocumentService (DOC)
|
||||
**Ticket:** DOC-1 - GDPicture and Nutrient Replacing
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
## 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:**
|
||||
```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);
|
||||
if (result.IsValid) { ... }
|
||||
```
|
||||
|
||||
@@ -2,7 +2,7 @@ using Microsoft.AspNetCore.Mvc.ApiExplorer;
|
||||
using Microsoft.OpenApi.Models;
|
||||
using Swashbuckle.AspNetCore.SwaggerGen;
|
||||
|
||||
namespace DocumentOperator.API.Configuration
|
||||
namespace DocumentService.API.Configuration
|
||||
{
|
||||
/// <summary>
|
||||
/// 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>
|
||||
/// Placeholder class for Serilog configuration extensions.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
using Microsoft.OpenApi.Models;
|
||||
using System.Reflection;
|
||||
|
||||
namespace DocumentOperator.API.Configuration
|
||||
namespace DocumentService.API.Configuration
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides extension methods for configuring Swagger/OpenAPI documentation.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace DocumentOperator.API.Configuration;
|
||||
namespace DocumentService.API.Configuration;
|
||||
|
||||
/// <summary>
|
||||
/// Configuration settings for Swagger/OpenAPI documentation.
|
||||
@@ -19,7 +19,7 @@ public class SwaggerSettings
|
||||
/// <summary>
|
||||
/// API title displayed in Swagger UI.
|
||||
/// </summary>
|
||||
public string Title { get; set; } = "DocumentOperator API";
|
||||
public string Title { get; set; } = "DocumentService API";
|
||||
|
||||
/// <summary>
|
||||
/// API version.
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
using DocumentOperator.Application.AddAttachments;
|
||||
using DocumentOperator.Application.CheckPdfAttachments.Queries;
|
||||
using DocumentOperator.Application.Common.DTOs;
|
||||
using DocumentOperator.Application.ExtractPdfAttachments;
|
||||
using DocumentOperator.Domain.Common.Exceptions;
|
||||
using DocumentService.Application.AddAttachments;
|
||||
using DocumentService.Application.CheckPdfAttachments.Queries;
|
||||
using DocumentService.Application.Common.DTOs;
|
||||
using DocumentService.Application.ExtractPdfAttachments;
|
||||
using DocumentService.Domain.Common.Exceptions;
|
||||
using MediatR;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace DocumentOperator.API.Controllers;
|
||||
namespace DocumentService.API.Controllers;
|
||||
|
||||
/// <summary>
|
||||
/// Controller for PDF attachment operations (detection, extraction, embedding)
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
using DocumentOperator.Application.ConvertFromPdfA;
|
||||
using DocumentOperator.Application.ConvertToPdfA;
|
||||
using DocumentOperator.Domain.Common.Exceptions;
|
||||
using DocumentService.Application.ConvertFromPdfA;
|
||||
using DocumentService.Application.ConvertToPdfA;
|
||||
using DocumentService.Domain.Common.Exceptions;
|
||||
using MediatR;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace DocumentOperator.API.Controllers;
|
||||
namespace DocumentService.API.Controllers;
|
||||
|
||||
/// <summary>
|
||||
/// Controller for PDF conversion operations (PDF ? PDF/A)
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
using DocumentOperator.Application.AddAnnotation;
|
||||
using DocumentOperator.Application.AddStamp;
|
||||
using DocumentOperator.Application.MergePdfs;
|
||||
using DocumentOperator.Domain.Common.Exceptions;
|
||||
using DocumentOperator.Domain.Models.ValueObjects;
|
||||
using DocumentService.Application.AddAnnotation;
|
||||
using DocumentService.Application.AddStamp;
|
||||
using DocumentService.Application.MergePdfs;
|
||||
using DocumentService.Domain.Common.Exceptions;
|
||||
using DocumentService.Domain.Models.ValueObjects;
|
||||
using MediatR;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace DocumentOperator.API.Controllers;
|
||||
namespace DocumentService.API.Controllers;
|
||||
|
||||
/// <summary>
|
||||
/// Controller for PDF operations (merge, stamp, annotate).
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
using DocumentOperator.Application.Common.DTOs;
|
||||
using DocumentOperator.Application.ValidatePdf.Queries;
|
||||
using DocumentOperator.Application.ValidatePdfA.Queries;
|
||||
using DocumentOperator.Domain.Common.Exceptions;
|
||||
using DocumentService.Application.Common.DTOs;
|
||||
using DocumentService.Application.ValidatePdf.Queries;
|
||||
using DocumentService.Application.ValidatePdfA.Queries;
|
||||
using DocumentService.Domain.Common.Exceptions;
|
||||
using MediatR;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace DocumentOperator.API.Controllers;
|
||||
namespace DocumentService.API.Controllers;
|
||||
|
||||
/// <summary>
|
||||
/// PDF validation operations
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
using DocumentOperator.Application.Common.DTOs;
|
||||
using DocumentOperator.Application.SwissQrCode.Queries;
|
||||
using DocumentOperator.Domain.Common.Exceptions;
|
||||
using DocumentService.Application.Common.DTOs;
|
||||
using DocumentService.Application.SwissQrCode.Queries;
|
||||
using DocumentService.Domain.Common.Exceptions;
|
||||
using MediatR;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace DocumentOperator.API.Controllers;
|
||||
namespace DocumentService.API.Controllers;
|
||||
|
||||
/// <summary>
|
||||
/// Swiss QR Code extraction operations
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
using DocumentOperator.Application.Common.DTOs;
|
||||
using DocumentOperator.Application.ExtractZugferd;
|
||||
using DocumentOperator.Application.HasZugferd.Queries;
|
||||
using DocumentOperator.Domain.Common.Exceptions;
|
||||
using DocumentService.Application.Common.DTOs;
|
||||
using DocumentService.Application.ExtractZugferd;
|
||||
using DocumentService.Application.HasZugferd.Queries;
|
||||
using DocumentService.Domain.Common.Exceptions;
|
||||
using MediatR;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace DocumentOperator.API.Controllers;
|
||||
namespace DocumentService.API.Controllers;
|
||||
|
||||
/// <summary>
|
||||
/// 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 Microsoft.AspNetCore.Mvc;
|
||||
using System.Net;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace DocumentOperator.API.Middleware;
|
||||
namespace DocumentService.API.Middleware;
|
||||
|
||||
/// <summary>
|
||||
/// Central exception handling middleware
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace DocumentOperator.API.Middleware
|
||||
namespace DocumentService.API.Middleware
|
||||
{
|
||||
/// <summary>
|
||||
/// Placeholder middleware for HTTP request/response logging.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace DocumentOperator.API.Middleware
|
||||
namespace DocumentService.API.Middleware
|
||||
{
|
||||
/// <summary>
|
||||
/// 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
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
- ? XML Comments aktiviert
|
||||
|
||||
2. **XML-Dokumentation aktiviert**
|
||||
- ? `API/DocumentOperator.API.csproj`
|
||||
- ? `API/DocumentService.API.csproj`
|
||||
- ? `<GenerateDocumentationFile>true</GenerateDocumentationFile>`
|
||||
|
||||
3. **Endpoint Dokumentation**
|
||||
@@ -146,12 +146,12 @@
|
||||
|
||||
5. **Program.cs Updates**
|
||||
- ? `builder.Services.AddSwaggerDocumentation()` statt `AddSwaggerGen()`
|
||||
- ? `using DocumentOperator.API.Configuration;` hinzugefügt
|
||||
- ? `using DocumentService.API.Configuration;` hinzugefügt
|
||||
|
||||
**Akzeptanzkriterien:**
|
||||
- ? Build erfolgreich
|
||||
- ? 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
|
||||
- ? Request/Response-Schemas sind dokumentiert
|
||||
- ? Endpoint ist im Swagger UI testbar
|
||||
|
||||
@@ -3,12 +3,12 @@ using Serilog.Ui.Core.Extensions;
|
||||
using Serilog.Ui.SqliteDataProvider.Extensions;
|
||||
using Serilog.Ui.Web.Extensions;
|
||||
using Scalar.AspNetCore;
|
||||
using DocumentOperator.Infrastructure.Configuration;
|
||||
using DocumentOperator.Application;
|
||||
using DocumentOperator.Application.Common.Configuration;
|
||||
using DocumentOperator.Infrastructure;
|
||||
using DocumentOperator.API.Middleware;
|
||||
using DocumentOperator.API.Configuration;
|
||||
using DocumentService.Infrastructure.Configuration;
|
||||
using DocumentService.Application;
|
||||
using DocumentService.Application.Common.Configuration;
|
||||
using DocumentService.Infrastructure;
|
||||
using DocumentService.API.Middleware;
|
||||
using DocumentService.API.Configuration;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
@@ -18,20 +18,20 @@ var builder = WebApplication.CreateBuilder(args);
|
||||
Log.Logger = new LoggerConfiguration()
|
||||
.ReadFrom.Configuration(builder.Configuration)
|
||||
.Enrich.FromLogContext()
|
||||
.Enrich.WithProperty("Application", "DocumentOperator")
|
||||
.Enrich.WithProperty("Application", "DocumentService")
|
||||
.CreateLogger();
|
||||
|
||||
builder.Host.UseSerilog();
|
||||
|
||||
Log.Information("Starting DocumentOperator API...");
|
||||
Log.Information("Starting DocumentService API...");
|
||||
|
||||
try
|
||||
{
|
||||
// ========================================
|
||||
// 2. Options Pattern Configuration
|
||||
// ========================================
|
||||
builder.Services.Configure<DocumentOperatorSettings>(
|
||||
builder.Configuration.GetSection(DocumentOperatorSettings.SectionName));
|
||||
builder.Services.Configure<DocumentServiceSettings>(
|
||||
builder.Configuration.GetSection(DocumentServiceSettings.SectionName));
|
||||
|
||||
builder.Services.Configure<ZugferdSettings>(
|
||||
builder.Configuration.GetSection("ZugferdSettings"));
|
||||
@@ -125,7 +125,7 @@ try
|
||||
// ========================================
|
||||
app.MapControllers(); // Maps all [ApiController] controllers
|
||||
|
||||
Log.Information("DocumentOperator API started successfully");
|
||||
Log.Information("DocumentService API started successfully");
|
||||
|
||||
app.Run();
|
||||
}
|
||||
@@ -141,7 +141,7 @@ finally
|
||||
|
||||
// Make Program class accessible for Integration Tests
|
||||
/// <summary>
|
||||
/// Entry point class for the DocumentOperator API.
|
||||
/// Entry point class for the DocumentService API.
|
||||
/// Made partial and public for integration test access.
|
||||
/// </summary>
|
||||
public partial class Program { }
|
||||
@@ -9,9 +9,9 @@
|
||||
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
|
||||
<ExcludeApp_Data>false</ExcludeApp_Data>
|
||||
<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>
|
||||
<DeployIisAppPath>DocumentOperator.API</DeployIisAppPath>
|
||||
<DeployIisAppPath>DocumentService.API</DeployIisAppPath>
|
||||
<_TargetId>IISWebDeployPackage</_TargetId>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
</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:**
|
||||
```powershell
|
||||
dotnet run --project DocumentOperator.API
|
||||
dotnet run --project DocumentService.API
|
||||
```
|
||||
Default URL: `https://localhost:5001` (check console output for actual port)
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
}
|
||||
},
|
||||
|
||||
"DocumentOperatorSettings": {
|
||||
"TempFolderPath": "C:\\Temp\\DocumentOperator\\Dev",
|
||||
"DocumentServiceSettings": {
|
||||
"TempFolderPath": "C:\\Temp\\DocumentService\\Dev",
|
||||
"EnableDetailedLogging": true
|
||||
},
|
||||
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
"AllowedHosts": "*",
|
||||
|
||||
"Application": {
|
||||
"LogDirectory": "E:\\LogFiles\\Digital Data\\DocumentOperator.API"
|
||||
"LogDirectory": "E:\\LogFiles\\Digital Data\\DocumentService.API"
|
||||
},
|
||||
|
||||
"SwaggerSettings": {
|
||||
"EnableInProduction": true,
|
||||
"Title": "DocumentOperator API",
|
||||
"Title": "DocumentService API",
|
||||
"Version": "v1",
|
||||
"Description": "PDF document processing service using DevExpress"
|
||||
},
|
||||
@@ -45,7 +45,7 @@
|
||||
{
|
||||
"Name": "SQLite",
|
||||
"Args": {
|
||||
"sqliteDbPath": "E:\\LogFiles\\Digital Data\\DocumentOperator.API\\logs.db",
|
||||
"sqliteDbPath": "E:\\LogFiles\\Digital Data\\DocumentService.API\\logs.db",
|
||||
"tableName": "Logs",
|
||||
"storeTimestampInUtc": true
|
||||
}
|
||||
@@ -54,8 +54,8 @@
|
||||
"Enrich": [ "FromLogContext", "WithMachineName", "WithThreadId" ]
|
||||
},
|
||||
|
||||
"DocumentOperatorSettings": {
|
||||
"TempFolderPath": "C:\\Temp\\DocumentOperator",
|
||||
"DocumentServiceSettings": {
|
||||
"TempFolderPath": "C:\\Temp\\DocumentService",
|
||||
"TempFileRetentionHours": 24,
|
||||
"MaxPdfSizeMB": 50,
|
||||
"EnableDetailedLogging": true
|
||||
@@ -79,7 +79,7 @@
|
||||
|
||||
"RedisSettings": {
|
||||
"ConnectionString": "localhost:6379",
|
||||
"InstanceName": "DocumentOperator:",
|
||||
"InstanceName": "DocumentService:",
|
||||
"CacheExpirationMinutes": 60
|
||||
},
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using DocumentOperator.Application.Common.Interfaces;
|
||||
using DocumentOperator.Domain.Models.ValueObjects;
|
||||
using DocumentService.Application.Common.Interfaces;
|
||||
using DocumentService.Domain.Models.ValueObjects;
|
||||
using FluentValidation;
|
||||
using MediatR;
|
||||
|
||||
namespace DocumentOperator.Application.AddAnnotation;
|
||||
namespace DocumentService.Application.AddAnnotation;
|
||||
|
||||
/// <summary>
|
||||
/// 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 MediatR;
|
||||
|
||||
namespace DocumentOperator.Application.AddAttachments;
|
||||
namespace DocumentService.Application.AddAttachments;
|
||||
|
||||
/// <summary>
|
||||
/// Command to add one or more attachments to a PDF document (supports PDF/A-3)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using FluentValidation;
|
||||
using MediatR;
|
||||
|
||||
namespace DocumentOperator.Application.AddStamp;
|
||||
namespace DocumentService.Application.AddStamp;
|
||||
|
||||
/// <summary>
|
||||
/// Command to add a stamp (text, image, or predefined) to PDF pages.
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using AutoMapper;
|
||||
using DocumentOperator.Application.Common.DTOs;
|
||||
using DocumentOperator.Application.Common.Interfaces;
|
||||
using DocumentService.Application.Common.DTOs;
|
||||
using DocumentService.Application.Common.Interfaces;
|
||||
using MediatR;
|
||||
|
||||
namespace DocumentOperator.Application.CheckPdfAttachments.Queries;
|
||||
namespace DocumentService.Application.CheckPdfAttachments.Queries;
|
||||
|
||||
/// <summary>
|
||||
/// Query for checking PDF attachments (Stream-based)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using FluentValidation;
|
||||
|
||||
namespace DocumentOperator.Application.CheckPdfAttachments.Queries;
|
||||
namespace DocumentService.Application.CheckPdfAttachments.Queries;
|
||||
|
||||
/// <summary>
|
||||
/// Validator for CheckPdfAttachmentsQuery
|
||||
|
||||
@@ -2,7 +2,7 @@ using MediatR;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace DocumentOperator.Application.Common.Behaviors;
|
||||
namespace DocumentService.Application.Common.Behaviors;
|
||||
|
||||
/// <summary>
|
||||
/// MediatR Pipeline Behavior that logs requests and tracks performance
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using FluentValidation;
|
||||
using MediatR;
|
||||
|
||||
namespace DocumentOperator.Application.Common.Behaviors;
|
||||
namespace DocumentService.Application.Common.Behaviors;
|
||||
|
||||
/// <summary>
|
||||
/// MediatR Pipeline Behavior that validates requests using FluentValidation
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace DocumentOperator.Application.Common.Configuration;
|
||||
namespace DocumentService.Application.Common.Configuration;
|
||||
|
||||
/// <summary>
|
||||
/// Configuration settings for ZUGFeRD/Factur-X/XRechnung detection
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace DocumentOperator.Application.Common.DTOs;
|
||||
namespace DocumentService.Application.Common.DTOs;
|
||||
|
||||
/// <summary>
|
||||
/// DTO for attachment check result returned to API layer
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace DocumentOperator.Application.Common.DTOs;
|
||||
namespace DocumentService.Application.Common.DTOs;
|
||||
|
||||
/// <summary>
|
||||
/// Represents complete attachment information for a PDF document.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace DocumentOperator.Application.Common.DTOs;
|
||||
namespace DocumentService.Application.Common.DTOs;
|
||||
|
||||
/// <summary>
|
||||
/// Represents metadata of a single PDF attachment (embedded file).
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace DocumentOperator.Application.Common.DTOs;
|
||||
namespace DocumentService.Application.Common.DTOs;
|
||||
|
||||
/// <summary>
|
||||
/// 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>
|
||||
/// 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(
|
||||
int pageCount,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace DocumentOperator.Application.Common.DTOs;
|
||||
namespace DocumentService.Application.Common.DTOs;
|
||||
|
||||
/// <summary>
|
||||
/// Response mit PDF-Metadaten
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace DocumentOperator.Application.Common.DTOs;
|
||||
namespace DocumentService.Application.Common.DTOs;
|
||||
|
||||
/// <summary>
|
||||
/// 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>
|
||||
/// Response containing extracted Swiss QR Code in dual format.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace DocumentOperator.Application.Common.DTOs;
|
||||
namespace DocumentService.Application.Common.DTOs;
|
||||
|
||||
/// <summary>
|
||||
/// 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
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Codecrete.SwissQRBill.Generator;
|
||||
|
||||
namespace DocumentOperator.Application.Common.Interfaces;
|
||||
namespace DocumentService.Application.Common.Interfaces;
|
||||
|
||||
/// <summary>
|
||||
/// Interface for Swiss QR Code processing operations.
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using AutoMapper;
|
||||
using Codecrete.SwissQRBill.Generator;
|
||||
using DocumentOperator.Application.Common.DTOs;
|
||||
using DocumentOperator.Domain.Models.ValueObjects;
|
||||
using DocumentService.Application.Common.DTOs;
|
||||
using DocumentService.Domain.Models.ValueObjects;
|
||||
|
||||
namespace DocumentOperator.Application.Common.Mapping;
|
||||
namespace DocumentService.Application.Common.Mapping;
|
||||
|
||||
/// <summary>
|
||||
/// 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 MediatR;
|
||||
|
||||
namespace DocumentOperator.Application.ConvertFromPdfA;
|
||||
namespace DocumentService.Application.ConvertFromPdfA;
|
||||
|
||||
/// <summary>
|
||||
/// 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 MediatR;
|
||||
|
||||
namespace DocumentOperator.Application.ConvertToPdfA;
|
||||
namespace DocumentService.Application.ConvertToPdfA;
|
||||
|
||||
/// <summary>
|
||||
/// Command to convert a standard PDF to PDF/A format
|
||||
|
||||
@@ -2,7 +2,7 @@ using FluentValidation;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace DocumentOperator.Application;
|
||||
namespace DocumentService.Application;
|
||||
|
||||
/// <summary>
|
||||
/// Dependency Injection configuration for Application Layer
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using DocumentOperator.Application.Common.Interfaces;
|
||||
using DocumentService.Application.Common.Interfaces;
|
||||
using FluentValidation;
|
||||
using MediatR;
|
||||
|
||||
namespace DocumentOperator.Application.ExtractPdfAttachments;
|
||||
namespace DocumentService.Application.ExtractPdfAttachments;
|
||||
|
||||
/// <summary>
|
||||
/// 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 DocumentOperator.Application.Common.Interfaces;
|
||||
using DocumentOperator.Domain.Common.Exceptions;
|
||||
using DocumentService.Application.Common.Configuration;
|
||||
using DocumentService.Application.Common.Interfaces;
|
||||
using DocumentService.Domain.Common.Exceptions;
|
||||
using FluentValidation;
|
||||
using MediatR;
|
||||
using Microsoft.Extensions.Options;
|
||||
|
||||
namespace DocumentOperator.Application.ExtractZugferd;
|
||||
namespace DocumentService.Application.ExtractZugferd;
|
||||
|
||||
/// <summary>
|
||||
/// Command to extract ZUGFeRD XML from a PDF document
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
using DocumentOperator.Application.Common.Configuration;
|
||||
using DocumentOperator.Application.Common.DTOs;
|
||||
using DocumentOperator.Application.Common.Interfaces;
|
||||
using DocumentService.Application.Common.Configuration;
|
||||
using DocumentService.Application.Common.DTOs;
|
||||
using DocumentService.Application.Common.Interfaces;
|
||||
using MediatR;
|
||||
using Microsoft.Extensions.Options;
|
||||
|
||||
namespace DocumentOperator.Application.HasZugferd.Queries;
|
||||
namespace DocumentService.Application.HasZugferd.Queries;
|
||||
|
||||
/// <summary>
|
||||
/// Query for checking if PDF contains ZUGFeRD XML attachment
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using FluentValidation;
|
||||
|
||||
namespace DocumentOperator.Application.HasZugferd.Queries;
|
||||
namespace DocumentService.Application.HasZugferd.Queries;
|
||||
|
||||
/// <summary>
|
||||
/// Validator for HasZugferdQuery
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using DocumentOperator.Application.Common.Interfaces;
|
||||
using DocumentService.Application.Common.Interfaces;
|
||||
using FluentValidation;
|
||||
using MediatR;
|
||||
|
||||
namespace DocumentOperator.Application.MergePdfs;
|
||||
namespace DocumentService.Application.MergePdfs;
|
||||
|
||||
/// <summary>
|
||||
/// Command to merge multiple PDF documents into a single PDF.
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using AutoMapper;
|
||||
using DocumentOperator.Application.Common.DTOs;
|
||||
using DocumentOperator.Application.Common.Interfaces;
|
||||
using DocumentService.Application.Common.DTOs;
|
||||
using DocumentService.Application.Common.Interfaces;
|
||||
using MediatR;
|
||||
|
||||
namespace DocumentOperator.Application.SwissQrCode.Queries;
|
||||
namespace DocumentService.Application.SwissQrCode.Queries;
|
||||
|
||||
/// <summary>
|
||||
/// 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;
|
||||
|
||||
namespace DocumentOperator.Application.SwissQrCode.Queries;
|
||||
namespace DocumentService.Application.SwissQrCode.Queries;
|
||||
|
||||
/// <summary>
|
||||
/// Validates ExtractSwissQrCodeQuery before handler execution.
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using AutoMapper;
|
||||
using DocumentOperator.Application.Common.DTOs;
|
||||
using DocumentOperator.Application.Common.Interfaces;
|
||||
using DocumentService.Application.Common.DTOs;
|
||||
using DocumentService.Application.Common.Interfaces;
|
||||
using MediatR;
|
||||
|
||||
namespace DocumentOperator.Application.ValidatePdf.Queries;
|
||||
namespace DocumentService.Application.ValidatePdf.Queries;
|
||||
|
||||
/// <summary>
|
||||
/// Query for PDF validation (Stream-based)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using DocumentOperator.Application.ValidatePdf.Queries;
|
||||
using DocumentService.Application.ValidatePdf.Queries;
|
||||
using FluentValidation;
|
||||
|
||||
namespace DocumentOperator.Application.ValidatePdf.Queries;
|
||||
namespace DocumentService.Application.ValidatePdf.Queries;
|
||||
|
||||
/// <summary>
|
||||
/// Validator for ValidatePdfQuery
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using AutoMapper;
|
||||
using DocumentOperator.Application.Common.DTOs;
|
||||
using DocumentOperator.Application.Common.Interfaces;
|
||||
using DocumentService.Application.Common.DTOs;
|
||||
using DocumentService.Application.Common.Interfaces;
|
||||
using MediatR;
|
||||
|
||||
namespace DocumentOperator.Application.ValidatePdfA.Queries;
|
||||
namespace DocumentService.Application.ValidatePdfA.Queries;
|
||||
|
||||
/// <summary>
|
||||
/// Query for PDF/A validation (Stream-based)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using FluentValidation;
|
||||
|
||||
namespace DocumentOperator.Application.ValidatePdfA.Validators;
|
||||
namespace DocumentService.Application.ValidatePdfA.Validators;
|
||||
|
||||
/// <summary>
|
||||
/// Validator for ValidatePdfAQuery
|
||||
|
||||
@@ -5,7 +5,7 @@ using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DocumentOperator.Domain.Common.Exceptions;
|
||||
namespace DocumentService.Domain.Common.Exceptions;
|
||||
|
||||
public class BadRequestException : Exception
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace DocumentOperator.Domain.Common.Exceptions;
|
||||
namespace DocumentService.Domain.Common.Exceptions;
|
||||
|
||||
/// <summary>
|
||||
/// Base exception for all domain-related exceptions.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace DocumentOperator.Domain.Common.Exceptions;
|
||||
namespace DocumentService.Domain.Common.Exceptions;
|
||||
|
||||
/// <summary>
|
||||
/// Exception thrown when domain validation fails (e.g., invalid Value Objects).
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace DocumentOperator.Domain.Common.Exceptions;
|
||||
namespace DocumentService.Domain.Common.Exceptions;
|
||||
|
||||
/// <summary>
|
||||
/// Exception thrown when a requested resource is not found.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace DocumentOperator.Domain.Models.ValueObjects;
|
||||
namespace DocumentService.Domain.Models.ValueObjects;
|
||||
|
||||
/// <summary>
|
||||
/// Coordinate origin point for PDF annotations.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace DocumentOperator.Domain.Models.ValueObjects;
|
||||
namespace DocumentService.Domain.Models.ValueObjects;
|
||||
|
||||
/// <summary>
|
||||
/// Supported PDF annotation types
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace DocumentOperator.Domain.Models.ValueObjects;
|
||||
namespace DocumentService.Domain.Models.ValueObjects;
|
||||
|
||||
/// <summary>
|
||||
/// Predefined stamp types with standard text and styling.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace DocumentOperator.Domain.Models.ValueObjects;
|
||||
namespace DocumentService.Domain.Models.ValueObjects;
|
||||
|
||||
/// <summary>
|
||||
/// 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>
|
||||
/// 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
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace DocumentOperator.Domain.Models.ValueObjects;
|
||||
namespace DocumentService.Domain.Models.ValueObjects;
|
||||
|
||||
/// <summary>
|
||||
/// Text markup annotation style (highlight, underline, strikeout)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace DocumentOperator.Infrastructure.Configuration;
|
||||
namespace DocumentService.Infrastructure.Configuration;
|
||||
|
||||
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 int TempFileRetentionHours { get; set; }
|
||||
@@ -1,10 +1,10 @@
|
||||
namespace DocumentOperator.Infrastructure.Configuration;
|
||||
namespace DocumentService.Infrastructure.Configuration;
|
||||
|
||||
public class RedisSettings
|
||||
{
|
||||
public const string SectionName = "RedisSettings";
|
||||
|
||||
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;
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace DocumentOperator.Infrastructure.Configuration;
|
||||
namespace DocumentService.Infrastructure.Configuration;
|
||||
|
||||
public class TenantInfo
|
||||
{
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using DocumentOperator.Application.Common.Interfaces;
|
||||
using DocumentOperator.Infrastructure.Services.PdfProcessing;
|
||||
using DocumentOperator.Infrastructure.Services.QrCodeProcessing;
|
||||
using DocumentService.Application.Common.Interfaces;
|
||||
using DocumentService.Infrastructure.Services.PdfProcessing;
|
||||
using DocumentService.Infrastructure.Services.QrCodeProcessing;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace DocumentOperator.Infrastructure;
|
||||
namespace DocumentService.Infrastructure;
|
||||
|
||||
/// <summary>
|
||||
/// Dependency Injection configuration for Infrastructure Layer
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
using DevExpress.Pdf;
|
||||
using DevExpress.Drawing;
|
||||
using System.Drawing;
|
||||
using DocumentOperator.Application.Common.DTOs;
|
||||
using DocumentOperator.Application.Common.Interfaces;
|
||||
using DocumentOperator.Domain.Common.Exceptions;
|
||||
using DocumentService.Application.Common.DTOs;
|
||||
using DocumentService.Application.Common.Interfaces;
|
||||
using DocumentService.Domain.Common.Exceptions;
|
||||
|
||||
namespace DocumentOperator.Infrastructure.Services.PdfProcessing;
|
||||
namespace DocumentService.Infrastructure.Services.PdfProcessing;
|
||||
|
||||
/// <summary>
|
||||
/// PDF processor implementation using DevExpress.Pdf library.
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
using Codecrete.SwissQRBill.Generator;
|
||||
using DevExpress.Drawing;
|
||||
using DevExpress.Pdf;
|
||||
using DocumentOperator.Application.Common.Interfaces;
|
||||
using DocumentOperator.Domain.Common.Exceptions;
|
||||
using DocumentService.Application.Common.Interfaces;
|
||||
using DocumentService.Domain.Common.Exceptions;
|
||||
using SkiaSharp;
|
||||
using SkiaSharp.QrCode;
|
||||
using System.Collections.Concurrent;
|
||||
|
||||
namespace DocumentOperator.Infrastructure.Services.QrCodeProcessing;
|
||||
namespace DocumentService.Infrastructure.Services.QrCodeProcessing;
|
||||
|
||||
/// <summary>
|
||||
/// Swiss QR Code processor using DevExpress PDF API for image extraction,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace DocumentOperator.Infrastructure.Services;
|
||||
namespace DocumentService.Infrastructure.Services;
|
||||
|
||||
public static class StringExtensions
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using DocumentOperator.API.Controllers; // For ExtractSwissQrCodeBase64Request DTO
|
||||
using DocumentOperator.Application.Common.DTOs;
|
||||
using DocumentService.API.Controllers; // For ExtractSwissQrCodeBase64Request DTO
|
||||
using DocumentService.Application.Common.DTOs;
|
||||
using FluentAssertions;
|
||||
using Microsoft.AspNetCore.Mvc.Testing;
|
||||
using System.Net;
|
||||
@@ -7,7 +7,7 @@ using System.Net.Http.Json;
|
||||
using System.Text.Json;
|
||||
using Xunit;
|
||||
|
||||
namespace DocumentOperator.Tests.Integration.API;
|
||||
namespace DocumentService.Tests.Integration.API;
|
||||
|
||||
public sealed class ExtractSwissQrCodeEndpointTests : IClassFixture<WebApplicationFactory<Program>>
|
||||
{
|
||||
@@ -27,7 +27,7 @@ public sealed class ExtractSwissQrCodeEndpointTests : IClassFixture<WebApplicati
|
||||
public async Task POST_ExtractSwissQrCode_ValidRequest_Returns200()
|
||||
{
|
||||
// Arrange
|
||||
var validPdfBase64 = GetEmbeddedResourceAsBase64("DocumentOperator.Tests.TestData.Pdfs.valid.pdf");
|
||||
var validPdfBase64 = GetEmbeddedResourceAsBase64("DocumentService.Tests.TestData.Pdfs.valid.pdf");
|
||||
|
||||
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)
|
||||
// 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
|
||||
{
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
using DocumentOperator.API.Controllers; // For CheckPdfAttachmentsRequest DTO
|
||||
using DocumentOperator.Application.Common.DTOs;
|
||||
using DocumentService.API.Controllers; // For CheckPdfAttachmentsRequest DTO
|
||||
using DocumentService.Application.Common.DTOs;
|
||||
using FluentAssertions;
|
||||
using Microsoft.AspNetCore.Mvc.Testing;
|
||||
using System.Net;
|
||||
using System.Net.Http.Json;
|
||||
using Xunit;
|
||||
|
||||
namespace DocumentOperator.Tests.Integration.API;
|
||||
namespace DocumentService.Tests.Integration.API;
|
||||
|
||||
/// <summary>
|
||||
/// Integration tests for PdfAttachmentController.
|
||||
@@ -31,7 +31,7 @@ public class PdfAttachmentControllerTests : IClassFixture<WebApplicationFactory<
|
||||
private static async Task<byte[]> LoadTestPdfAsync(string filename)
|
||||
{
|
||||
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);
|
||||
if (stream == null)
|
||||
|
||||
@@ -3,12 +3,12 @@ using System.Net.Http.Headers;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
using DocumentOperator.API.Controllers;
|
||||
using DocumentOperator.Domain.Models.ValueObjects;
|
||||
using DocumentService.API.Controllers;
|
||||
using DocumentService.Domain.Models.ValueObjects;
|
||||
using FluentAssertions;
|
||||
using Microsoft.AspNetCore.Mvc.Testing;
|
||||
|
||||
namespace DocumentOperator.Tests.Integration.API;
|
||||
namespace DocumentService.Tests.Integration.API;
|
||||
|
||||
public class PdfOperationsControllerTests : IClassFixture<WebApplicationFactory<Program>>
|
||||
{
|
||||
@@ -22,7 +22,7 @@ public class PdfOperationsControllerTests : IClassFixture<WebApplicationFactory<
|
||||
private static Stream LoadTestPdfAsStream(string fileName)
|
||||
{
|
||||
var assembly = Assembly.GetExecutingAssembly();
|
||||
var resourceName = $"DocumentOperator.Tests.TestData.Pdfs.{fileName}";
|
||||
var resourceName = $"DocumentService.Tests.TestData.Pdfs.{fileName}";
|
||||
return assembly.GetManifestResourceStream(resourceName)
|
||||
?? throw new FileNotFoundException($"Embedded resource not found: {resourceName}");
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
using DocumentOperator.API.Controllers; // For Base64Request DTOs
|
||||
using DocumentOperator.Application.Common.DTOs;
|
||||
using DocumentService.API.Controllers; // For Base64Request DTOs
|
||||
using DocumentService.Application.Common.DTOs;
|
||||
using FluentAssertions;
|
||||
using Microsoft.AspNetCore.Mvc.Testing;
|
||||
using System.Net;
|
||||
using System.Net.Http.Json;
|
||||
using Xunit;
|
||||
|
||||
namespace DocumentOperator.Tests.Integration.API;
|
||||
namespace DocumentService.Tests.Integration.API;
|
||||
|
||||
public class PdfValidationControllerTests : IClassFixture<WebApplicationFactory<Program>>
|
||||
{
|
||||
@@ -27,7 +27,7 @@ public class PdfValidationControllerTests : IClassFixture<WebApplicationFactory<
|
||||
// Arrange
|
||||
// Verwende ein echtes Test-PDF (embedded resource aus Unit Tests)
|
||||
var assembly = typeof(PdfValidationControllerTests).Assembly;
|
||||
var resourceName = "DocumentOperator.Tests.TestData.Pdfs.valid.pdf";
|
||||
var resourceName = "DocumentService.Tests.TestData.Pdfs.valid.pdf";
|
||||
|
||||
byte[] pdfBytes;
|
||||
using (var stream = assembly.GetManifestResourceStream(resourceName))
|
||||
@@ -101,7 +101,7 @@ public class PdfValidationControllerTests : IClassFixture<WebApplicationFactory<
|
||||
{
|
||||
// Arrange
|
||||
var assembly = typeof(PdfValidationControllerTests).Assembly;
|
||||
var resourceName = "DocumentOperator.Tests.TestData.Pdfs.valid.pdf";
|
||||
var resourceName = "DocumentService.Tests.TestData.Pdfs.valid.pdf";
|
||||
|
||||
byte[] pdfBytes;
|
||||
using (var stream = assembly.GetManifestResourceStream(resourceName))
|
||||
@@ -176,7 +176,7 @@ public class PdfValidationControllerTests : IClassFixture<WebApplicationFactory<
|
||||
{
|
||||
// Arrange
|
||||
var assembly = typeof(PdfValidationControllerTests).Assembly;
|
||||
var resourceName = "DocumentOperator.Tests.TestData.Pdfs.valid.pdf";
|
||||
var resourceName = "DocumentService.Tests.TestData.Pdfs.valid.pdf";
|
||||
|
||||
byte[] pdfBytes;
|
||||
using (var stream = assembly.GetManifestResourceStream(resourceName))
|
||||
@@ -250,7 +250,7 @@ public class PdfValidationControllerTests : IClassFixture<WebApplicationFactory<
|
||||
{
|
||||
// Arrange
|
||||
var assembly = typeof(PdfValidationControllerTests).Assembly;
|
||||
var resourceName = "DocumentOperator.Tests.TestData.Pdfs.valid.pdf";
|
||||
var resourceName = "DocumentService.Tests.TestData.Pdfs.valid.pdf";
|
||||
|
||||
byte[] pdfBytes;
|
||||
using (var stream = assembly.GetManifestResourceStream(resourceName))
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
using AutoMapper;
|
||||
using DocumentOperator.Application.CheckPdfAttachments.Queries;
|
||||
using DocumentOperator.Application.Common.DTOs;
|
||||
using DocumentOperator.Application.Common.Interfaces;
|
||||
using DocumentService.Application.CheckPdfAttachments.Queries;
|
||||
using DocumentService.Application.Common.DTOs;
|
||||
using DocumentService.Application.Common.Interfaces;
|
||||
|
||||
using FluentAssertions;
|
||||
using Moq;
|
||||
|
||||
namespace DocumentOperator.Tests.Unit.Application.CheckPdfAttachments;
|
||||
namespace DocumentService.Tests.Unit.Application.CheckPdfAttachments;
|
||||
|
||||
/// <summary>
|
||||
/// Unit tests for CheckPdfAttachmentsQueryHandler.
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
using AutoMapper;
|
||||
using DocumentOperator.Application.Common.DTOs;
|
||||
using DocumentOperator.Application.Common.Interfaces;
|
||||
using DocumentOperator.Application.ValidatePdf.Queries;
|
||||
using DocumentOperator.Domain.Common.Exceptions;
|
||||
using DocumentService.Application.Common.DTOs;
|
||||
using DocumentService.Application.Common.Interfaces;
|
||||
using DocumentService.Application.ValidatePdf.Queries;
|
||||
using DocumentService.Domain.Common.Exceptions;
|
||||
using FluentAssertions;
|
||||
using Moq;
|
||||
using Xunit;
|
||||
|
||||
namespace DocumentOperator.Tests.Unit.Application.Features.ValidatePdf;
|
||||
namespace DocumentService.Tests.Unit.Application.Features.ValidatePdf;
|
||||
|
||||
public class ValidatePdfHandlerTests
|
||||
{
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
using AutoMapper;
|
||||
using DocumentOperator.Application.Common.DTOs;
|
||||
using DocumentOperator.Application.Common.Interfaces;
|
||||
using DocumentOperator.Application.ValidatePdfA.Queries;
|
||||
using DocumentOperator.Domain.Common.Exceptions;
|
||||
using DocumentService.Application.Common.DTOs;
|
||||
using DocumentService.Application.Common.Interfaces;
|
||||
using DocumentService.Application.ValidatePdfA.Queries;
|
||||
using DocumentService.Domain.Common.Exceptions;
|
||||
|
||||
using FluentAssertions;
|
||||
using Moq;
|
||||
using Xunit;
|
||||
|
||||
namespace DocumentOperator.Tests.Unit.Application.Features.ValidatePdfA;
|
||||
namespace DocumentService.Tests.Unit.Application.Features.ValidatePdfA;
|
||||
|
||||
public class ValidatePdfAQueryHandlerTests
|
||||
{
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
using System.Reflection;
|
||||
using DocumentOperator.Application.Common.DTOs;
|
||||
using DocumentOperator.Application.Common.Interfaces;
|
||||
using DocumentOperator.Domain.Common.Exceptions;
|
||||
using DocumentOperator.Infrastructure.Services.PdfProcessing;
|
||||
using DocumentService.Application.Common.DTOs;
|
||||
using DocumentService.Application.Common.Interfaces;
|
||||
using DocumentService.Domain.Common.Exceptions;
|
||||
using DocumentService.Infrastructure.Services.PdfProcessing;
|
||||
using FluentAssertions;
|
||||
|
||||
namespace DocumentOperator.Tests.Unit.Infrastructure.Services.PdfProcessing;
|
||||
namespace DocumentService.Tests.Unit.Infrastructure.Services.PdfProcessing;
|
||||
|
||||
/// <summary>
|
||||
/// Unit tests for DevExpressPdfProcessor.
|
||||
@@ -31,7 +31,7 @@ public class DevExpressPdfProcessorTests
|
||||
private static byte[] LoadTestPdf(string filename)
|
||||
{
|
||||
var assembly = Assembly.GetExecutingAssembly();
|
||||
var resourceName = $"DocumentOperator.Tests.TestData.Pdfs.{filename}";
|
||||
var resourceName = $"DocumentService.Tests.TestData.Pdfs.{filename}";
|
||||
|
||||
using var stream = assembly.GetManifestResourceStream(resourceName);
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
using System.Reflection;
|
||||
using DocumentOperator.Application.Common.Interfaces;
|
||||
using DocumentOperator.Domain.Common.Exceptions;
|
||||
using DocumentOperator.Infrastructure.Services.QrCodeProcessing;
|
||||
using DocumentService.Application.Common.Interfaces;
|
||||
using DocumentService.Domain.Common.Exceptions;
|
||||
using DocumentService.Infrastructure.Services.QrCodeProcessing;
|
||||
using FluentAssertions;
|
||||
|
||||
namespace DocumentOperator.Tests.Unit.Infrastructure.Services.QrCodeProcessing;
|
||||
namespace DocumentService.Tests.Unit.Infrastructure.Services.QrCodeProcessing;
|
||||
|
||||
/// <summary>
|
||||
/// Unit tests for DevExpressSwissQrCodeProcessor.
|
||||
@@ -30,7 +30,7 @@ public class DevExpressSwissQrCodeProcessorTests
|
||||
private static Stream LoadTestPdf(string filename)
|
||||
{
|
||||
var assembly = Assembly.GetExecutingAssembly();
|
||||
var resourceName = $"DocumentOperator.Tests.TestData.Pdfs.{filename}";
|
||||
var resourceName = $"DocumentService.Tests.TestData.Pdfs.{filename}";
|
||||
|
||||
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)
|
||||
**Ticket:** DOC-1 - GDPicture and Nutrient Replacing
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
## 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/
|
||||
- **PDF/A Standard:** ISO 19005
|
||||
- **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