Describe the bug
DataAnnotations Validation not compatible with ServiceLocationPolicy.NotAllowed
To Reproduce
- Have a message with DataAnnotationAttributes.
- Add
opts.ServiceLocationPolicy = ServiceLocationPolicy.NotAllowed;
- Add
UseDataAnnotationsValidationProblemDetailMiddleware
Expected behavior
CodeGen should generate the handlers
Additional context
The DataAnnotationsHttpValidationExecutor requires IServiceProvider directly to create the DataAnnotations ValidationContext. Perhaps using IWolverineRuntime instead and pick the serviceprovider that's available there?
Describe the bug
DataAnnotations Validation not compatible with
ServiceLocationPolicy.NotAllowedTo Reproduce
opts.ServiceLocationPolicy = ServiceLocationPolicy.NotAllowed;UseDataAnnotationsValidationProblemDetailMiddlewareExpected behavior
CodeGen should generate the handlers
Additional context
The
DataAnnotationsHttpValidationExecutorrequiresIServiceProviderdirectly to create the DataAnnotationsValidationContext. Perhaps usingIWolverineRuntimeinstead and pick the serviceprovider that's available there?