5 Commits

Author SHA1 Message Date
0e88b349d7 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.
2026-07-30 14:02:56 +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
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
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