Introduced `ZugferdController` to handle ZUGFeRD-related operations, including detection and extraction of ZUGFeRD XML from PDFs via file upload or Base64-encoded payloads. Integrated `MediatR` for query/command handling.
Added `ZugferdSettings` for configurable file names and patterns, and updated `appsettings.json` and `Program.cs` to support this configuration.
Implemented `HasZugferdQuery` and `ExtractZugferdCommand` with their respective handlers and validators. Added DTOs (`ZugferdCheckResult`, `ZugferdExtractionResult`) for operation results.
Included `ZUGFeRD-Example.pdf` for testing and integrated `Serilog.Ui.Core.Extensions` for logging.
- Move PdfMetadata, PdfAMetadata from Domain.Models.ValueObjects to Application.Common.DTOs
- Move AttachmentInfo, AttachmentMetadata from Domain.Models.ValueObjects to Application.Common.DTOs
- Reason: DTOs belong in Application layer, Domain should have zero external dependencies (Clean Architecture)
- Change SwissQrCodeExtractionResult to use Bill + RawLines
- Update ISwissQrCodeProcessor to return tuple (Bill, string[])
- Add Codecrete.SwissQRBill.Generator v3.4.0 package reference
- Update ExtractSwissQrCodeQuery handler to use AutoMapper for Bill->DTO mapping
- Remove References property from query (not needed for QR extraction)
- Add SwissQrBillDto, AddressDto, AlternativeSchemeDto for Codecrete Bill mapping
- Add BadRequestException to Domain exceptions
- DTOs include [Obsolete] warnings for deprecated fields (AddressLine1/2)
Updated `DocumentEndpoints` to include detailed requirements, return values, and use case for the `ExtractSwissQrCode` endpoint.
Marked Feature 2 (`ExtractSwissQrCode`) as completed in `PHASENPLAN.md` and `ROADMAP.md`, summarizing achievements and outlining next steps for Feature 3 (`ExtractAttachments`).
Enhanced `ExtractSwissQrCodeRequest` and `ExtractSwissQrCodeResponse` DTOs with example JSON payloads for clarity.
Expanded `SwissQrCodeDataDto` and `AddressDataDto` with detailed field-level documentation to improve usability and adherence to Swiss QR Bill Standard 2.0.
Introduced DTOs for request and response to handle Swiss QR Code extraction from PDF documents. Implemented `ExtractSwissQrCodeHandler` to process the extraction using `ISwissQrCodeProcessor`. Added validation for the query with `ExtractSwissQrCodeValidator`. Developed unit tests to ensure correct behavior for successful and failure scenarios.
Implemented the ValidatePDF feature end-to-end:
- Added `/api/v1/documents/validate` Minimal API endpoint.
- Introduced centralized ExceptionHandlingMiddleware.
- Configured Swagger with `AddSwaggerDocumentation` extension.
- Enabled XML comments in `DocumentOperator.API.csproj`.
- Updated DTOs with XML comments and added `FileSizeMB`.
- Added integration tests for the ValidatePDF endpoint (3 tests).
- Registered infrastructure services (e.g., `IPdfProcessor`).
- Refactored `Program.cs` to include middleware and endpoints.
- Updated PHASENPLAN.md and ROADMAP.md to reflect progress.
- Cleaned up code and made `Program` accessible for tests.
Updated PHASENPLAN and ROADMAP to reflect progress on Feature 1 - ValidatePDF (75% complete). Marked Step 1.1 as completed, including MediatR setup, pipeline behaviors (`ValidationBehavior`, `LoggingBehavior`), ValidatePDF feature (Query, Handler, Validator), and DTOs.
Added `DependencyInjection.cs` for Application Layer DI configuration. Introduced `LoggingBehavior` and `ValidationBehavior` for MediatR pipelines. Implemented `ValidatePdfHandler`, `ValidatePdfQuery`, and `ValidatePdfValidator`.
Created DTOs (`ValidatePdfRequest`, `ValidatePdfResponse`) for the ValidatePDF feature. Added unit tests for `ValidatePdfHandler` to verify metadata handling and exception propagation.
Removed unused folder references in `DocumentOperator.Application.csproj`.