Add request validation and tests for API input models#11
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| builder.Services.AddValidatorsFromAssemblyContaining<UserDetailsInputModelValidator>(); | ||
| builder.Services.AddFluentValidationAutoValidation(); | ||
| builder.Services.AddFluentValidationClientsideAdapters(); | ||
|
|
||
| builder.Services.Configure<ApiBehaviorOptions>(options => |
There was a problem hiding this comment.
Fix missing FluentValidation/MVC usings to compile
Program.cs now calls AddValidatorsFromAssemblyContaining, AddFluentValidationAutoValidation, and configures ApiBehaviorOptions, but the file has no using FluentValidation;, using FluentValidation.AspNetCore;, or using Microsoft.AspNetCore.Mvc;. These extension methods and types are not covered by the Web SDK implicit usings, so the project will not compile (IServiceCollection won’t have those methods and ApiBehaviorOptions/BadRequestObjectResult are unresolved). Add the required using directives or fully qualify the types to restore a successful build.
Useful? React with 👍 / 👎.
Summary
Testing
Codex Task