Skip to content

feat(validation) add fluent validation for product commands with validation pipeline#8

Merged
marciomyst merged 1 commit into
developfrom
feature/05-refine-domain-validation-and-invariants
Jul 22, 2025
Merged

feat(validation) add fluent validation for product commands with validation pipeline#8
marciomyst merged 1 commit into
developfrom
feature/05-refine-domain-validation-and-invariants

Conversation

@marciomyst

Copy link
Copy Markdown
Owner
  • Implement CreateProductCommandValidator, UpdateProductCommandValidator, and DeleteProductCommandValidator in application layer
  • Add ValidationBehavior<TRequest, TResponse> as a MediatR pipeline to enforce validation
  • Register validators and pipeline behavior in Program.cs
  • Add global middleware to catch DomainValidationException and return 400 with a ValidationProblemDetails payload
  • Introduce unit tests for each product command validator

- Implement CreateProductCommandValidator, UpdateProductCommandValidator, and DeleteProductCommandValidator in application layer
- Add ValidationBehavior<TRequest, TResponse> as a MediatR pipeline to enforce validation
- Register validators and pipeline behavior in Program.cs
- Add global middleware to catch DomainValidationException and return 400 with a ValidationProblemDetails payload
- Introduce unit tests for each product command validator
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)
8.6% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@marciomyst
marciomyst merged commit 84a4b89 into develop Jul 22, 2025
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant