Commit Graph

138 Commits

Author SHA1 Message Date
34e38f19e5 feat: Add PdfAttachmentController extract endpoints (multipart + Base64) 2026-07-21 09:26:34 +02:00
61b1595258 test: Add ExtractAttachmentsAsync unit tests (ZIP validation, edge cases) 2026-07-21 09:26:27 +02:00
26458a4017 feat: Implement DevExpressPdfProcessor.ExtractAttachmentsAsync with ZIP packaging 2026-07-21 09:26:18 +02:00
2c673ea98e feat: Add IPdfProcessor.ExtractAttachmentsAsync interface method 2026-07-21 09:26:11 +02:00
1989ca7ef7 feat: Add ExtractPdfAttachments Application layer (Command/Handler/Validator merged) 2026-07-21 09:26:04 +02:00
0f4d860176 test(integration): migrate integration tests to Controller DTOs and update assertions
Test Changes:
- Use Controller DTOs (ValidatePdfBase64Request, ValidatePdfABase64Request, CheckPdfAttachmentsRequest, ExtractSwissQrCodeBase64Request)
- Remove direct Query object usage in HTTP tests (architectural violation)
- Update imports: DocumentOperator.API.Controllers namespace

Assertion Updates:
- Invalid Base64 tests: case-insensitive regex (?i)base.?64 (FormatException message contains 'Base-64' with hyphen)
- Empty PDF tests: regex match for 'Base64|empty|stream' (flexible validation error matching)
- Corrupted PDF test: Expect 500 Internal Server Error (DevExpress exception propagates naturally)

Result: 52 tests pass, 6 skipped (IBAN validation - DevExpress limitation)
2026-07-20 16:33:19 +02:00
645dfceafa test(unit): migrate unit tests to Stream API
Application Handler Tests:
- ValidatePdfHandlerTests: PdfStream = new MemoryStream(pdfBytes)
- ValidatePdfAQueryHandlerTests: PdfStream = new MemoryStream(pdfBytes)
- CheckPdfAttachmentsQueryHandlerTests: PdfStream = new MemoryStream(pdfBytes)
- Remove Base64/PdfBytes property usage

Infrastructure Tests:
- DevExpressSwissQrCodeProcessorTests: LoadTestPdf() returns Stream
- All test methods use 'using var stream' pattern
- Add test: ExtractSwissQrCodeAsync_StreamNotAtBeginning_ThrowsBadRequestException

Result: All unit tests pass with Stream-based API
2026-07-20 16:33:00 +02:00
07be9b9f02 refactor(domain): remove obsolete exception types
Deleted:
- PdfProcessingException: Obsolete, DevExpress exceptions now propagate naturally
- SwissQrCodeNotFoundException: Moved to Application layer (feature-specific exception)

Rationale:
- PdfProcessingException was wrapping library exceptions unnecessarily
- Better to let infrastructure exceptions propagate → middleware handles as 500
- SwissQrCodeNotFoundException is application-level concern, not domain
2026-07-20 16:32:36 +02:00
a1e8575018 refactor(api): remove generic exception handling from middleware
Remove FormatException/ArgumentException handling:
- These are framework exceptions, not application-specific
- May come from internal libraries (false positives for 400 Bad Request)
- Controllers now wrap Base64 conversion with BadRequestException explicitly

Remove PdfProcessingException handling:
- Exception type removed (obsolete)
- DevExpress exceptions now propagate naturally → 500 Internal Server Error

Current exception mapping:
- ValidationException (FluentValidation) → 400 Bad Request
- BadRequestException (custom) → 400 Bad Request
- NotFoundException (custom) → 404 Not Found
- SwissQrCodeNotFoundException (custom) → 404 Not Found
- All others → 500 Internal Server Error
2026-07-20 16:32:19 +02:00
b4befde418 refactor(api): migrate controllers to Stream API with Base64 validation
PdfValidationController:
- ValidateFromFile: IFormFile.OpenReadStream() direct usage (no byte[] copy)
- ValidateFromBase64: try-catch Convert.FromBase64String → BadRequestException
- ValidatePdfAFromFile: IFormFile.OpenReadStream() direct usage
- ValidatePdfAFromBase64: try-catch Convert.FromBase64String → BadRequestException

PdfAttachmentController:
- CheckAttachmentsFromBase64: try-catch Convert.FromBase64String → BadRequestException

SwissQrCodeController:
- ExtractFromBase64: try-catch Convert.FromBase64String → BadRequestException

All controllers: Add using DocumentOperator.Domain.Common.Exceptions for BadRequestException
2026-07-20 16:32:03 +02:00
1af158840e refactor(infrastructure): implement Stream-based PDF processing
DevExpressPdfProcessor:
- ValidateAsync, ValidatePdfAAsync, CheckAttachmentsAsync: Stream parameters
- Defensive Position=0 validation (BadRequestException for seekable streams not at beginning)
- Remove unsafe Position reset (non-seekable stream compatibility)
- Remove PdfProcessingException wrapping (let DevExpress exceptions propagate naturally)

DevExpressSwissQrCodeProcessor:
- ExtractSwissQrCodeAsync: Stream parameter
- Defensive Position=0 validation
- Remove unsafe Position reset

Memory optimization: MemoryStream.TryGetBuffer fast path for byte[] extraction
2026-07-20 16:31:47 +02:00
5dc2e38507 refactor(application): update processor interfaces for Stream API
- IPdfProcessor: ValidateAsync, ValidatePdfAAsync, CheckAttachmentsAsync now accept Stream
- ISwissQrCodeProcessor: ExtractSwissQrCodeAsync now accepts Stream
- Update XML documentation: Position=0 requirement, non-seekable stream support
- Exception documentation: BadRequestException for validation errors (stream empty/invalid/wrong position)
2026-07-20 16:31:31 +02:00
c93488c29f refactor(application): migrate all queries to Stream-based API
- Replace byte[] and Base64String with required Stream PdfStream
- Simplify validators: remove XOR/Base64 validation, only check NotNull
- Affected queries: ValidatePdfQuery, ValidatePdfAQuery, CheckPdfAttachmentsQuery, ExtractSwissQrCodeQuery
- Memory efficiency: direct stream usage, no intermediate byte[] copies
2026-07-20 16:31:14 +02:00
251ecc34d9 test: Add tests for CheckPdfAttachments feature
- Unit tests for CheckPdfAttachmentsQueryHandler (3 tests)
- Integration tests for PdfAttachmentController (14 tests covering both multipart and JSON endpoints)
- Tests verify: attachment detection, metadata extraction, empty PDF handling, validation errors
- All tests using Stream API (mocks with It.IsAny<Stream>())
- Total: 17 new tests, all passing
2026-07-20 11:56:19 +02:00
9db15f7025 feat: Add PdfAttachmentController with CheckAttachments endpoints
- Add POST /api/pdf/attachments/check endpoint (multipart/form-data)
- Add POST /api/pdf/attachments/check endpoint (application/json with Base64)
- Dual input support: IFormFile (file upload) and Base64 JSON
- Controller converts IFormFile → byte[] and sends to MediatR
- Complete XML documentation with Swagger examples
- Primary constructor pattern used
2026-07-20 11:56:12 +02:00
364b755f95 feat: Add CheckPdfAttachments feature - Application layer
- Add CheckPdfAttachmentsQuery with dual input support (byte[] + Base64)
- Add CheckPdfAttachmentsQueryHandler with IPdfProcessor integration
- Add CheckPdfAttachmentsQueryValidator with FluentValidation rules
- Add AttachmentCheckResult DTO for API response
- Handler converts byte[] → MemoryStream for IPdfProcessor.CheckAttachmentsAsync()
- AutoMapper maps AttachmentInfo → AttachmentCheckResult
2026-07-20 11:56:03 +02:00
f2e6ef0260 chore: Remove obsolete Domain enums (DocumentOperationType, ProcessingStatus)
- These enums were part of initial scaffolding but never used
- Domain layer cleanup - removing unused code
2026-07-20 11:55:55 +02:00
8aff3138ff test: Fix obsolete exception expectations in SwissQrCodeProcessor tests
- SwissQrCodeNotFoundException → NotFoundException (obsolete exception replaced)
- PdfProcessingException → ArgumentException (DevExpress throws ArgumentException for invalid PDFs)
- ArgumentNullException → NullReferenceException (actual behavior of current implementation)
2026-07-20 11:55:48 +02:00
58f9b07af3 test: Update Application handler unit tests for Stream API
- Update mock setups: It.IsAny<byte[]>() → It.IsAny<Stream>()
- Update mock verifications: Verify Stream parameter instead of byte[]
- Remove obsolete namespace imports (Domain.Models.ValueObjects)
- Update exception expectations (BadRequestException instead of PdfProcessingException)
2026-07-20 11:55:41 +02:00
468dca46d4 test: Update DevExpressPdfProcessor unit tests for Stream API
- Add ToStream() helper method to convert byte[] → MemoryStream
- Update all test method calls to use ToStream(pdfBytes)
- Fix null/empty stream tests (use Stream directly instead of byte[])
- Update exception expectations (ArgumentNullException for null streams, BadRequestException for empty streams)
- Update namespace imports (Application.Common.DTOs instead of Domain.Models.ValueObjects)
2026-07-20 11:55:33 +02:00
e13e85182a refactor: Update Application handlers to convert byte[] to Stream
- ValidatePdfQueryHandler: Convert byte[] → MemoryStream before calling IPdfProcessor
- ValidatePdfAQueryHandler: Same pattern
- Update AutoMapper namespace imports (remove Domain.Models.ValueObjects references)
2026-07-20 11:55:25 +02:00
1de781748b refactor: Update DevExpressPdfProcessor to use Stream parameters
- All 3 methods (ValidateAsync, ValidatePdfAAsync, CheckAttachmentsAsync) now accept Stream
- Add ArgumentNullException.ThrowIfNull() checks for null streams
- Implement fast-path optimization: reuse MemoryStream buffer when possible
- Implement slow-path fallback: copy stream to byte[] for DevExpress API compatibility
- Fix namespace collision: use fully qualified Application.Common.DTOs.PdfMetadata
2026-07-20 11:55:17 +02:00
73a7afe257 refactor: Change IPdfProcessor interface from byte[] to Stream
- ValidateAsync(byte[]) → ValidateAsync(Stream)
- ValidatePdfAAsync(byte[]) → ValidatePdfAAsync(Stream)
- CheckAttachmentsAsync(byte[]) → CheckAttachmentsAsync(Stream)
- Reason: Stream-based processing reduces memory footprint and enables pipeline parallelization
2026-07-20 11:55:08 +02:00
d123bc996e refactor: Move DTOs from Domain to Application layer
- 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)
2026-07-20 11:55:01 +02:00
4085a88485 Update XML docs for raw param in SwissQrCodeController
Removed detailed description of the `raw` parameter in XML
documentation for two methods in `SwissQrCodeController`.
Updated `<returns>` tag to simplify the explanation by
removing conditional details based on the `raw` parameter.
These changes affect methods handling multipart/form-data
PDF input and Base64 JSON input.
2026-07-20 10:51:30 +02:00
88984c8887 Refactor and streamline codebase
- Removed `<Folder>` elements in `DocumentOperator.Domain.csproj`
  and replaced them with `<Compile Remove>`, `<EmbeddedResource Remove>`,
  and `<None Remove>` to exclude specific directories.
- Removed unused `using DocumentOperator.Domain.Exceptions;` directive.
- Simplified `Split` method syntax for delimiter specification.
- Updated `return` statements to use concise parameter syntax.
- Removed page number validation logic in `DevExpressSwissQrCodeProcessor`.
- Replaced default page scanning logic with modern range expression.
- Overall, improved code clarity, reduced redundancy, and modernized syntax.
2026-07-20 09:46:44 +02:00
a315fbf890 feat: Add raw parameter to SwissQrCodeController endpoints
- Add 'raw' query parameter to both ExtractFromFile and ExtractFromBase64 methods
- Returns raw QR text lines when raw=true, parsed Bill object when raw=false (default)
- Remove obsolete 'references' parameter (not part of QR extraction logic)
- Add XML documentation for raw parameter
- Update ExceptionHandlingMiddleware to handle BadRequestException
2026-07-16 15:48:09 +02:00
1a89887056 test: Update tests for tuple return type and new API structure
- Update unit tests to assert (Bill, string[]) tuple return
- Update integration tests for new response structure (Bill + RawLines)
- Fix exception message assertion in DevExpressSwissQrCodeProcessorTests
- All 34 tests passing, 6 skipped (require real Swiss QR Bill PDFs)
2026-07-16 15:47:56 +02:00
a729df6fda refactor: Make Domain exceptions serializable and add XML docs
- Add [Serializable] attribute to all custom exceptions
- Add protected constructors for serialization support
- Add XML documentation comments
- Update SwissQrCodeNotFoundException message format
2026-07-16 15:47:44 +02:00
88bde13422 refactor: Refactor DevExpressSwissQrCodeProcessor to use Codecrete QRBill parser
- Change return type to tuple (Bill, string[])
- Remove custom parsing methods (ParseSwissQrBillContent, MapAddress, DetermineReferenceType)
- Use Codecrete QRBill.DecodeQrCodeText() for parsing
- Add SkiaSharp.QrCode v1.0.0 for QR decoding
- Remove obsolete ZXing and System.Drawing dependencies
- Add StringExtensions for QR code detection
- Raw lines properly split and trimmed from QR text
2026-07-16 15:47:33 +02:00
889144f144 feat: Add AutoMapper mappings for Codecrete Bill to DTOs
- Add Bill -> SwissQrBillDto mapping
- Add Address -> AddressDto mapping
- Add AlternativeScheme -> AlternativeSchemeDto mapping
- Document AutoMapper policy in comments
2026-07-16 15:47:19 +02:00
35016f02e1 refactor: Update Application layer for Codecrete Bill integration
- 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)
2026-07-16 15:47:09 +02:00
e321963487 refactor: Remove SwissQrCodeData domain value object
- Delete SwissQrCodeData.cs and AddressData
- Migrating to direct use of Codecrete Bill class
2026-07-16 15:46:55 +02:00
711f1a2660 feat: Add SwissQrBillDto and BadRequestException
- Add SwissQrBillDto, AddressDto, AlternativeSchemeDto for Codecrete Bill mapping
- Add BadRequestException to Domain exceptions
- DTOs include [Obsolete] warnings for deprecated fields (AddressLine1/2)
2026-07-16 15:46:44 +02:00
386a124a4e Add DualInputDocumentFilter for Swagger content merging
Introduced the `DualInputDocumentFilter` class to merge Swagger operations with the same path but different `[Consumes]` attributes (`multipart/form-data` and `application/json`) into a single operation. This ensures both content types are visible in the Swagger UI.

Updated `SwaggerConfiguration.cs` to:
- Resolve conflicting actions by keeping the first variant.
- Register the `DualInputDocumentFilter` to enable content type merging.
2026-07-13 16:04:55 +02:00
f7433111a7 test: Add PDF/A validation tests and manual testing guide
- Add unit tests for ValidatePdfAQueryHandler (4 tests)
- Add integration tests for PDF/A validation endpoint (6 tests)
- Fix FluentValidation: Add Base64 format validation to ValidatePdfAQueryValidator
- Update AGENTS.md: Document 3-folder test structure rationale and test count (30 tests)
- Add DocumentOperator.API/README.md: 16 manual test scenarios for all endpoints

Test coverage:
- Unit: ValidatePdfAQueryHandler (compliant, non-compliant, encrypted, exceptions)
- Integration: PDF/A endpoint (multipart + Base64, validation, error handling)
- Manual: Step-by-step Swagger UI testing guide for all features

All 30 automated tests passing.
2026-07-09 14:01:57 +02:00
cd50d45bd5 feat: Add PDF/A validation endpoint (Feature 3)
Domain layer:

  - PdfAMetadata value object (isValid, pdfVersion, pageCount, encrypted, pdfaVersion, pdfaCompliant, errors, warnings)

Infrastructure layer:

  - IPdfProcessor.ValidatePdfAAsync() interface method

  - DevExpressPdfProcessor.ValidatePdfAAsync() implementation

  - DetectEncryption() - scans PDF raw data for /Encrypt keyword

  - DetectPdfAConformance() - parses XMP metadata (pdfaid:part, pdfaid:conformance)

  - Validation: encrypted PDF cannot be PDF/A compliant

Application layer:

  - ValidatePdfAQuery + ValidatePdfAQueryHandler (co-located)

  - ValidatePdfAQueryValidator (FluentValidation: PdfBytes XOR Base64Pdf)

  - PdfAValidationResult DTO

  - AutoMapper: PdfAMetadata -> PdfAValidationResult

API layer:

  - PdfValidationController.ValidatePdfAFromFile() (multipart/form-data)

  - PdfValidationController.ValidatePdfAFromBase64() (application/json)

  - XML documentation with response codes

Result:

  - POST /api/pdf/validation/validate-pdfa (both multipart and JSON)

  - Returns: conformance level, errors, warnings

  - Build: 0 errors, 4 warnings (DevExpress eval)

  - Tests: 20/20 passing

Next: Integration tests + Swagger test case
2026-07-09 12:59:24 +02:00
1ff7cbea11 add example PDFs 2026-07-09 12:53:49 +02:00
dc0af68d26 docs: Update API specification based on Marvin/Marlon feedback
CONTROLLER_ENDPOINTS.md changes:

  - Binary stream output for all operations (NO outputPath, NO base64)

  - PDF Operations: merge, stamp, annotate → return application/pdf stream

  - PDF Conversion: to-pdfa, from-pdfa → return application/pdf stream

  - Attachment Extraction: extract → return application/zip stream

  - Add Attachment endpoint (Phase 2): embed files in PDF/PDF/A-3

  - Swiss QR Code endpoint documented (already implemented)

  - PdfRenderController REMOVED (moved to .NET client library)

AGENTS.md changes:

  - Current Status: SwissQrCodeController  DONE (2 tests)

  - Current Status: PdfValidationController  Partial (4 tests)

  - Phase reorganization:

    - Phase 1: validate, validate-pdfa, check, extract (SwissQR), extract (attachments), merge

    - Phase 2: stamp, annotate, add-attachment

    - Phase 3: to-pdfa, from-pdfa

  - Removed PdfRenderController from all phases

Design decisions (team consensus):

  - Server endpoints stay granular (validate, check, extract separate)

  - Combined operations (validateANDextract) → .NET client library

  - Binary streams avoid filesystem dependencies

  - No base64 overhead (~33%), client library handles conversions

Result: Clean API spec, memory-based operations, client convenience layer
2026-07-08 15:46:10 +02:00
45bc90b8b8 test: Update integration tests for Controller-based API
Integration test updates:

  - PdfValidationControllerTests.cs (new)

    - Test /api/pdf/validation/validate endpoint

    - Test BOTH multipart/form-data AND Base64 JSON

  - ExtractSwissQrCodeEndpointTests.cs (updated)

    - Update endpoint path to /api/swissqrcode/extract

    - Test BOTH input formats

Unit test updates:

  - ValidatePdfHandlerTests.cs:

    - Update for Query + Handler co-location

    - Test AutoMapper integration

  - ExtractSwissQrCodeHandlerTests.cs:

    - Update for Query + Handler co-location

    - Test AutoMapper integration

Deleted:

  - DocumentEndpointsTests.cs (Minimal API tests, no longer relevant)

Result: 20/20 tests passing, Controller endpoint coverage
2026-07-07 19:01:35 +02:00
57e36fc004 refactor: Migrate from Minimal API to Controller-based API
Architecture decision change:

  - Previous: Minimal API (DocumentEndpoints.cs) - WRONG approach

  - Required: Controller-based API (per CONTROLLER_ENDPOINTS.md)

New controllers:

  - PdfValidationController:

    - POST /api/pdf/validation/validate

    - Accepts BOTH IFormFile (multipart) AND Base64 JSON

    - Returns PdfValidationResult

  - SwissQrCodeController:

    - POST /api/swissqrcode/extract

    - Accepts BOTH IFormFile (multipart) AND Base64 JSON

    - Returns SwissQrCodeExtractionResult

Controller best practices:

  - Primary constructors (C# 12)

  - Thin controllers (pass request to MediatR directly)

  - No manual mapping (AutoMapper handles domain -> DTO)

  - XML documentation for Swagger

  - [ProducesResponseType] attributes

Deleted:

  - API/Endpoints/v1/DocumentEndpoints.cs (Minimal API)

  - ROADMAP.md (conflicting guidance with CONTROLLER_ENDPOINTS.md)

Result: Controller-based API, dual input support (multipart + JSON)
2026-07-07 19:01:20 +02:00
d6e3a5fda1 refactor: Restructure Application layer with vertical slices and AutoMapper
Vertical slice architecture:

  - Move Features/Documents/{UseCase}/ to {UseCase}/Queries/

  - Query + Handler in SAME file (co-located)

  - Validator in separate file (single responsibility)

New structure:

  - ValidatePdf/Queries/ValidatePdfQuery.cs (Query + Handler)

  - ValidatePdf/Queries/ValidatePdfQueryValidator.cs

  - SwissQrCode/Queries/ExtractSwissQrCodeQuery.cs (Query + Handler)

  - SwissQrCode/Queries/ExtractSwissQrCodeQueryValidator.cs

AutoMapper integration:

  - Add Common/Mapping/MappingProfile.cs

  - Map PdfMetadata -> PdfValidationResult (domain -> DTO)

  - Map SwissQrCodeData -> SwissQrCodeExtractionResult (domain -> DTO)

  - Controllers now thin: pass request to MediatR, AutoMapper handles mapping

DTO improvements:

  - Rename: ValidatePdfResponse -> PdfValidationResult (business-friendly)

  - Rename: ExtractSwissQrCodeResponse -> SwissQrCodeExtractionResult

  - Support BOTH byte[] and Base64Pdf string (XOR validation)

  - Use modern C# 12 collection expressions

Code quality:

  - Use PascalCase for primary constructor parameters

  - Fix LoggingBehavior logging format

Deleted old structure:

  - Features/Documents/ValidatePdf/ (old horizontal structure)

  - Features/Documents/ExtractSwissQrCode/ (old horizontal structure)

  - Common/DTOs/{Request|Response} (replaced with {Result})

Result: Vertical slices, AutoMapper v16.2.0, thin controllers
2026-07-07 19:01:05 +02:00
b460d8df39 refactor: Remove Base64String value object per YAGNI principle
Remove unnecessary Base64String value object:

  - Performance overhead (validation runs twice: value object + FluentValidation)

  - Unnecessary abstraction (Convert.FromBase64String already validates)

  - YAGNI principle: use string directly + extension methods if needed

Replaced with:

  - Direct string usage in DTOs

  - FluentValidation for Base64 format validation

  - FormatException handling in ExceptionHandlingMiddleware (maps to 400)

Result: Simpler code, better performance, same validation coverage
2026-07-07 19:00:43 +02:00
398651964e chore: Upgrade AutoMapper to v16.2.0 and fix DI registration
- Upgrade AutoMapper from 12.0.1 to 16.2.0

- Remove deprecated AutoMapper.Extensions.Microsoft.DependencyInjection v12.0.1

  (deprecated 25 May 2023, DI moved to main package in v13.0+)

- Update DI registration: AddAutoMapper(cfg => {}, typeof(MappingProfile))

  (v13.0+ requires Action<IMapperConfigurationExpression> + marker type)

Security fix:

  - Resolves NU1903 vulnerability (GHSA-rvv3-g6hj-g44x DoS in v12.0.1)

Result: AutoMapper v16.2.0, 0 security warnings, all tests passing
2026-07-07 19:00:29 +02:00
f8690b9417 docs: Add AGENTS.md architecture guidance for AI agents
Comprehensive architecture documentation including:

  - Clean Architecture with Controller-based API (NOT Minimal API)

  - Vertical slice architecture pattern

  - Exception-based error handling (no Result<T>)

  - Feature-driven development approach

  - Primary constructor coding standards

  - Git commit guidelines

  - Swiss QR Bill backward compatibility decisions

Key decisions documented:

  - Windows-only targeting (no Linux support needed)

  - Support BOTH multipart/form-data AND Base64 JSON

  - Separate endpoints for Combined Address (K-Type) legacy support

  - Multi-tenancy deferred until after all sync features complete
2026-07-07 19:00:12 +02:00
077eb1e017 docs: Add XML documentation comments to API layer
Add missing XML doc comments to resolve CS1591 warnings:

  - SerilogConfiguration: Class comment

  - SwaggerConfiguration: Class and AddSwaggerDocumentation() method

  - ExceptionHandlingMiddleware: Constructor and InvokeAsync() method

  - RequestLoggingMiddleware: Placeholder class comment

  - TenantResolutionMiddleware: Placeholder class comment

  - Program: Partial class comment for integration test access

Result: 0 CS1591 warnings in DocumentOperator.API project
2026-07-07 18:56:23 +02:00
8b154e7378 fix: Replace CreateBitmap with CreateDXBitmap for cross-platform compatibility
- Replace System.Drawing.Bitmap with DevExpress.Drawing.DXBitmap

- Fix CA1416 warnings (Windows-specific API usage)

- Fix CS0618 warning (TryInverted property moved to Options.TryInverted)

- Add [SupportedOSPlatform(windows)] attribute to DecodeQrCodeFromImage()

- Add Swiss QR Bill backward compatibility documentation

- Suppress CS0618 for AddressLine1/AddressLine2 (deprecated since Nov 2025)

- Use modern C# 12 collection expression syntax

Technical changes:

  - CreateBitmap() to CreateDXBitmap() (returns DXBitmap)

  - Convert DXBitmap to PNG stream to System.Drawing.Bitmap for ZXing

  - Add using DevExpress.Drawing and System.Runtime.Versioning

Result: 0 CA1416 warnings, 0 CS0618 warnings in DevExpressSwissQrCodeProcessor
2026-07-07 18:56:09 +02:00
a12d529d9e Add documentation for DocumentOperator service
Added `CONTROLLER_ENDPOINTS.md` to define REST API endpoints and
`REQUIRED_FEATURES.md` to outline required functions and features
for the `DocumentOperator` service. These documents include
detailed specifications for controllers, input/output formats,
usage scenarios, and technical requirements.

Updated `DocumentOperator.sln` to include the new documentation
files under a "Solution Items" section for better visibility.

Defined a prioritization strategy for feature implementation,
technical requirements, and a comprehensive test strategy.
Referenced relevant standards (e.g., PDF/A, ZUGFeRD) and
documented usage of the DevExpress Office File API.
2026-07-06 10:33:01 +02:00
OlgunR
d03806e622 It seems your list of code changes is empty. Could you provide the descriptions of the changes made to the files? Once you do, I can help craft a concise and comprehensive commit message for you! 2026-06-26 10:21:40 +02:00
OlgunR
84c0a54c1e Enhance ExtractSwissQrCode feature documentation
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.
2026-06-26 08:58:25 +02:00