For example, we write an HTTP endpoint:
[WolverineGet("/welcome")]
public static async Task<IResult> HandleWelcome([FromQuery] WelcomeQuery query)
{
...
}
In this case, HttpChain will have the ComplexQueryStringType field set to the actual query type, while RequestType is still equal to typeof(void). As a result, the chain doesn’t pass the check in HttpChainFluentValidationPolicy:
foreach (var chain in chains.Where(x => x.HasRequestType))
{
Apply(chain, container);
}
Therefore, no validation is applied to the endpoint.
For reference, all WolverineFx components are at version 4.12.2.
example.cs
For example, we write an HTTP endpoint:
In this case,
HttpChainwill have theComplexQueryStringTypefield set to the actual query type, whileRequestTypeis still equal totypeof(void). As a result, the chain doesn’t pass the check inHttpChainFluentValidationPolicy:Therefore, no validation is applied to the endpoint.
For reference, all WolverineFx components are at version 4.12.2.
example.cs