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.
17 lines
386 B
C#
17 lines
386 B
C#
using FluentValidation;
|
|
|
|
namespace DocumentOperator.Application.HasZugferd.Queries;
|
|
|
|
/// <summary>
|
|
/// Validator for HasZugferdQuery
|
|
/// </summary>
|
|
public class HasZugferdQueryValidator : AbstractValidator<HasZugferdQuery>
|
|
{
|
|
public HasZugferdQueryValidator()
|
|
{
|
|
RuleFor(x => x.PdfStream)
|
|
.NotNull()
|
|
.WithMessage("PDF stream is required");
|
|
}
|
|
}
|