Skip to main content

Asset Service Validation

Validation layers

Endpoint delegates rely on model binding plus explicit command validation; no endpoint-filter or FluentValidation layer exists. Result mapping distinguishes invalid, missing, conflicting, and forbidden outcomes. A document guard converts integration unavailability into a service-unavailable response.

Tenant context is required for commands and missing context is mapped centrally. Value objects enforce required code/name, normalization, and maximum lengths. The aggregate enforces lifecycle eligibility, assignee presence, request identity, rejection reason, retired-state restrictions, and document-reference creation. Application code checks tenant-scoped code duplicates, workflow-managed direct-action conflicts, callback decision/subject/state, and document payload/asset existence.

Clearance is a read-only derived verdict, not write validation. Employee existence, active state, resource ownership, role permission, serial uniqueness, document access, workflow-callback caller authenticity, and cross-service transaction integrity are not validated. Invalid list status text is ignored rather than rejected.

Requires confirmation

Production ownership, authorization governance, operational policy, and future architecture require confirmation where the source does not enforce them.

Source References

  • microservices/src/asset-service/Api/EndpointResults.cs
  • microservices/src/asset-service/Domain/Asset/Asset.cs
  • microservices/src/asset-service/Application/Commands/AssetCommands.cs
  • microservices/src/asset-service/Infrastructure/Persistence.cs