Open jxwaters opened 1 year ago
Hello! What version of package do you use? Please try 6.0.0-beta.3 (I added minimal API example)
The minimal API example doesn't look like a minimal API. It still uses controllers. An example minimal API would be:
var app = WebApplication.Create(args);
app.MapGet("/", () => "Hello World!");
app.Run();
Hello! What version of package do you use? Please try 6.0.0-beta.3 (I added minimal API example)
Don't know what you did, but it solved my issue. Thanks
I am using dotnet 7 minapi, and I have fluent validation that does work on my endpoints, as well as working swagger docs. However, the swagger docs do not pick up the rules from my validators. For instance, the Create User API has this rule:
I see it working if I omit email:
But the information is not in Swagger:
The validators are added here:
srv.AddValidatorsFromAssemblyContaining<CreteUserValidator>(ServiceLifetime.Singleton);
And to Swagger here (later on):